Ver Fonte

防止定时任务异常

DESKTOP-53URE31\USER há 7 meses atrás
pai
commit
6a8f7f3aaa
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      wechat.go

+ 1 - 0
wechat.go

@@ -52,6 +52,7 @@ func main() {
 
 	cronCtx := cron.New(cron.WithChain(
 		cron.SkipIfStillRunning(cron.DefaultLogger),
+		cron.Recover(cron.DefaultLogger),
 	))
 	crontask.ScheduleRun(cronCtx, ctx)
 	go cronCtx.Start()