From c0fb9fcc9c281e41921fa47bdb879d5c36625ffd Mon Sep 17 00:00:00 2001 From: fuzhongyun <15339891972@163.com> Date: Mon, 5 Jan 2026 17:51:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=B4=E6=97=B6=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E4=BB=85=E7=BA=BF=E4=B8=8A?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/server/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index baca30d..cf658c3 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -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))) }