Kaynağa Gözat

定时任务

alan 11 ay önce
ebeveyn
işleme
807707fb4c

+ 2 - 3
src/main/java/com/zhili/dashboard/scheduler/JobScheduler.java

@@ -31,10 +31,9 @@ public class JobScheduler {
      * 10min一次
      */
     @Async
-    @Scheduled(cron = "*/5 * * * * ?")
+    @Scheduled(cron = "0 0 0 * * ?")
     public void updateAlarmMsg() {
-        log.info("定时任务执行一次");
-//        alarmMsgService.updateAlarmMsg();
+        alarmMsgService.updateAlarmMsg();
     }
     /**
      * 同步电池信息