|
@@ -41,7 +41,9 @@ public class BehospitalInfoAnalyzeTask implements SchedulingConfigurer {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
//1.添加任务内容(Runnable)
|
|
|
- if (null != task001 && task001.getIsDeleted().equals(IsDeleteEnum.N.getKey())){
|
|
|
+ if (null != task001
|
|
|
+ && task001.getIsDeleted().equals(IsDeleteEnum.N.getKey())
|
|
|
+ && task001.getIsUsed().equals(1)) {
|
|
|
System.out.println("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
|
|
|
}
|
|
|
}
|
|
@@ -56,7 +58,7 @@ public class BehospitalInfoAnalyzeTask implements SchedulingConfigurer {
|
|
|
if (null != task001 && StringUtil.isNotBlank(task001.getCron())) {
|
|
|
cron = task001.getCron();
|
|
|
}
|
|
|
- CronTrigger trigger=new CronTrigger(cron);
|
|
|
+ CronTrigger trigger = new CronTrigger(cron);
|
|
|
return trigger.nextExecutionTime(triggerContext);
|
|
|
}
|
|
|
});
|