From 5df344667773da880d521ef45a4ca497af355d05 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 19 六月 2020 10:40:08 +0800
Subject: [PATCH] fix restriction schedule

---
 controllers/restriction.go |    2 +-
 main.go                    |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/controllers/restriction.go b/controllers/restriction.go
index c4d4fdd..a624d49 100644
--- a/controllers/restriction.go
+++ b/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()
 	})
diff --git a/main.go b/main.go
index 6bb3d29..202ddc5 100644
--- a/main.go
+++ b/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()
 }

--
Gitblit v1.8.0