feat: 临时支持定时任务仅线上使用
This commit is contained in:
parent
0eea75cd6c
commit
c0fb9fcc9c
|
|
@ -28,7 +28,10 @@ func main() {
|
|||
}()
|
||||
//钉钉机器人
|
||||
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)))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue