fix 增加12小时Ck过期禁用检测 需要配置Ctime 随机分钟
This commit is contained in:
parent
94f23cbc5f
commit
4449b0b044
@ -3,6 +3,8 @@ package models
|
||||
import (
|
||||
"github.com/beego/beego/v2/adapter/logs"
|
||||
"github.com/robfig/cron/v3"
|
||||
"math/rand"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
var c *cron.Cron
|
||||
@ -18,6 +20,7 @@ func initCron() {
|
||||
}
|
||||
c.AddFunc("3 */1 * * *", initVersion)
|
||||
c.AddFunc("40 */1 * * *", GitPullAll)
|
||||
c.AddFunc("0 "+strconv.Itoa(rand.Intn(59))+" "+Config.CTime+"/12 * * ?", initCookie)
|
||||
|
||||
}
|
||||
c.Start()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user