|
@@ -68,14 +68,10 @@ public class OpenAccountValveInspection implements InitializingBean, Job, Seria
|
|
|
entity.setJobName("OpenAccountValveInspectionSyncByJob" );
|
|
|
entity.setDescription("OpenAccountValveInspectionSyncByJob" );
|
|
|
// modify by pengdi ,判断定时任务是否存在,不存在才进行新增
|
|
|
-
|
|
|
- boolean exists = jobAndTriggerService.isExists(entity);
|
|
|
- if(!exists) {
|
|
|
- String cron = "0 */2 * * * ?";
|
|
|
- log.info("巡检开户开阀操作:" + cron);
|
|
|
- entity.setCronExpression(cron);
|
|
|
- entity.setJobClassName(OpenAccountValveInspection.class.getName());
|
|
|
- jobAndTriggerService.save(entity);
|
|
|
- }
|
|
|
+ String cron = "0 */2 * * * ?";
|
|
|
+ log.info("巡检开户开阀操作:" + cron);
|
|
|
+ entity.setCronExpression(cron);
|
|
|
+ entity.setJobClassName(OpenAccountValveInspection.class.getName());
|
|
|
+ jobAndTriggerService.save(entity);
|
|
|
}
|
|
|
}
|