Browse Source

修改定时任务时间

k.zhang 2 years ago
parent
commit
65126e602d
2 changed files with 3 additions and 2 deletions
  1. 2 1
      main.go
  2. 1 1
      report/report.go

+ 2 - 1
main.go

@@ -3,6 +3,7 @@ package main
 import (
 	"duoduo/conf"
 	"duoduo/database"
+	"duoduo/report"
 	"duoduo/routers"
 	"fmt"
 	"os"
@@ -19,6 +20,6 @@ func main() {
 
 	}
 	database.Setup()
-	//report.SysCronStart()
+	report.SysCronStart()
 	routers.InitRouter()
 }

+ 1 - 1
report/report.go

@@ -5,7 +5,7 @@ import "github.com/robfig/cron"
 const (
 	cronSettDateCutoff = "0 0 1 * * *"    //每天凌晨1:00:00
 	cronRunStart       = "0 0 17 * * *"   //凌晨一点
-	cronMinuteStart    = "0 */10 * * * *" //每10分钟
+	cronMinuteStart    = "0 */20 * * * *" //每10分钟
 )
 
 func SysCronStart() {