浏览代码

fix:周一定时任务添加

duxin 1 年之前
父节点
当前提交
2add70a376
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/jfw/timetask/timetask.go

+ 1 - 1
src/jfw/timetask/timetask.go

@@ -50,7 +50,7 @@ func updateHotKeys() {
 			}
 		}
 	})
-    c.AddFunc("0 1 * * 1", func() { //每月1号清理匿名用户日志表 保留最近30天
+    c.AddFunc("0 0 1 * * 1", func() { //每周1清理匿名用户日志表 保留最近30天
         tm:=time.Now().AddDate(0,0,-qutil.IntAllDef(config.Sysconfig["anonymousTime"],30)).Unix()
         count := public.BaseMysql.CountBySql(fmt.Sprintf(`SELECT count(*) FROM anonymous_identity WHERE  creation_time < %d and refer = ''  and   fid is null`,tm))
         for i := 0; i < int(math.Ceil(float64(count)/float64(2000))); i++ {