private static String isRuning = “”;
//@Scheduled(cron = "0 */1 * * * ? ")
@Scheduled(cron = "0 0 1 * * ?")
public synchronized void automaticTask() {
try {
synchronized (isRuning) {
if (TypeHandlerUtil.isNotEmpty(isRuning))
return;
isRuning = "T";
}
if (app.getAppType() == 2) {
Map<String, String> tokenmap = new HashMap<>();
tokenmap.put("token", " ");
ThreadLocalContext.getInstance().setCurrentSession(tokenmap);
Map<String, Object> map = new HashMap<>();
taskService.entryTask(map);
taskService.custTask(map);
taskService.updateagaintrack(map);
}
} finally {
isRuning = "";
}
}
// 定时任务多还是去xml 配置下