|
@@ -16,15 +16,15 @@ public class TaskController {
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "*/10 * * * * ?") // 每10秒执行一次(使用cron表达式)
|
|
|
- public void runTask(){
|
|
|
+ public void sendMq(){
|
|
|
try {
|
|
|
- taskService.runTask();
|
|
|
+ taskService.sendMq();
|
|
|
}catch (Exception e){
|
|
|
log.info("runTask:",e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Scheduled(cron = "*/20 * * * * ?") // 每20秒执行一次(使用cron表达式)
|
|
|
+ @Scheduled(cron = "*/30 * * * * ?") // 每30秒执行一次(使用cron表达式)
|
|
|
public void openEcs(){
|
|
|
try {
|
|
|
taskService.openEcsList();
|
|
@@ -33,7 +33,15 @@ public class TaskController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Scheduled(cron = "*/30 * * * * ?") // 每30秒执行一次(使用cron表达式)
|
|
|
+ @Scheduled(cron = "*/20 * * * * ?") // 每20秒执行一次(使用cron表达式)
|
|
|
+ public void checkDelEcs() {
|
|
|
+ try {
|
|
|
+ taskService.checkDelEcs();
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.info("checkDelEcs:", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ @Scheduled(cron = "*/5 * * * * ?") // 每5秒执行一次(使用cron表达式)
|
|
|
public void delEcs(){
|
|
|
try {
|
|
|
taskService.delEcsList();
|
|
@@ -43,10 +51,4 @@ public class TaskController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|