controllers/restriction.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
main.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
controllers/restriction.go
@@ -42,7 +42,7 @@ func Schedule() { c := cron.New() //每天凌晨5点执行一次,获取当日数据 c.AddFunc("0 0 5 * * ?", func() { c.AddFunc("0 0 1 * * ?", func() { todayRes = nil getRestrictionInfo() }) main.go
@@ -1,6 +1,7 @@ package main import ( "car-service/controllers" _ "car-service/routers" "github.com/astaxie/beego" ) @@ -10,5 +11,6 @@ beego.BConfig.WebConfig.DirectoryIndex = true beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger" } controllers.Schedule() beego.Run() }