|
@@ -47,31 +47,6 @@ func CronScheduled(ctx context.Context) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- // duetimecst, _ := time.ParseInLocation("15:04:05", "00:10:00", time.Local)
|
|
|
- // duetimecst1, _ := time.ParseInLocation("15:04:05", "00:00:00", time.Local)
|
|
|
- // spec := fmt.Sprintf("@every %v", duetimecst.Sub(duetimecst1))
|
|
|
-
|
|
|
- // c := cron.New()
|
|
|
- // c.AddFunc(spec, func() {
|
|
|
- // tx1 := restful.Engine.NewSession()
|
|
|
- // defer tx1.Close()
|
|
|
- // exist, err := tx1.Table("notice").Where("status = 1").And("content = ? ", "downloadedplan_log").Exist()
|
|
|
- // if err != nil {
|
|
|
- // logs.Error("CronScheduled-error-1:", err)
|
|
|
- // return
|
|
|
- // }
|
|
|
-
|
|
|
- // if exist {
|
|
|
- // _, err := tx.SQL(`update notice set status = 0 where content = ? `, "downloadedplan_log").Execute()
|
|
|
- // if err != nil {
|
|
|
- // logs.Error("CronScheduled-error-2:", err)
|
|
|
- // return
|
|
|
- // }
|
|
|
- // Scheduled(ctx, tx1, pastureinfo)
|
|
|
- // }
|
|
|
-
|
|
|
- // })
|
|
|
- // c.Start()
|
|
|
//消息提醒
|
|
|
duetimecst2, _ := time.ParseInLocation("15:04:05", "00:01:00", time.Local)
|
|
|
duetimecst3, _ := time.ParseInLocation("15:04:05", "00:00:00", time.Local)
|