Browse Source

定时任务

alan 11 months ago
parent
commit
807707fb4c
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/main/java/com/zhili/dashboard/scheduler/JobScheduler.java

+ 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();
     }
     /**
      * 同步电池信息