|
@@ -1,6 +1,7 @@
|
|
|
package com.zhili.dashboard.scheduler;
|
|
|
|
|
|
import com.zhili.dashboard.service.*;
|
|
|
+import lombok.extern.log4j.Log4j2;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -11,6 +12,7 @@ import javax.annotation.Resource;
|
|
|
* @author user
|
|
|
*/
|
|
|
@Component
|
|
|
+@Log4j2
|
|
|
public class JobScheduler {
|
|
|
@Resource
|
|
|
IDeviceService deviceService;
|
|
@@ -29,9 +31,10 @@ public class JobScheduler {
|
|
|
* 10min一次
|
|
|
*/
|
|
|
@Async
|
|
|
- @Scheduled(cron = "0 0 0 * * ?")
|
|
|
+ @Scheduled(cron = "*/5 * * * * ?")
|
|
|
public void updateAlarmMsg() {
|
|
|
- alarmMsgService.updateAlarmMsg();
|
|
|
+ log.info("定时任务执行一次");
|
|
|
+// alarmMsgService.updateAlarmMsg();
|
|
|
}
|
|
|
/**
|
|
|
* 同步电池信息
|