🐛 修复 cron/v3 表达式

This commit is contained in:
naiba
2021-07-19 10:37:12 +08:00
parent d116347ef9
commit aa5ac76442
5 changed files with 28 additions and 22 deletions

View File

@@ -61,9 +61,15 @@ func initSystem() {
loadCrons() //加载计划任务
// 清理 服务请求记录 和 流量记录 的旧数据
dao.Cron.AddFunc("0 20 3 * * *", cleanMonitorHistory)
_, err := dao.Cron.AddFunc("30 3 * * *", cleanMonitorHistory)
if err != nil {
panic(err)
}
// 流量记录打点
dao.Cron.AddFunc("0 0 * * * *", recordTransferHourlyUsage)
_, err = dao.Cron.AddFunc("0 * * * *", recordTransferHourlyUsage)
if err != nil {
panic(err)
}
}
func recordTransferHourlyUsage() {