feat: 临时支持定时任务仅线上使用

This commit is contained in:
fuzhongyun 2026-01-05 17:51:00 +08:00
parent 0eea75cd6c
commit c0fb9fcc9c
1 changed files with 5 additions and 2 deletions

View File

@ -28,7 +28,10 @@ func main() {
}() }()
//钉钉机器人 //钉钉机器人
app.DingBotServer.Run(ctx, *onBot) app.DingBotServer.Run(ctx, *onBot)
//定时任务 //定时任务 - 测试环境不启用
app.Cron.Run(ctx) if configPath != nil && *configPath == "./config/config.yaml" {
app.Cron.Run(ctx)
}
log.Fatal(app.HttpServer.Listen(fmt.Sprintf(":%d", bc.Server.Port))) log.Fatal(app.HttpServer.Listen(fmt.Sprintf(":%d", bc.Server.Port)))
} }