|
|
|
@ -73,13 +73,15 @@ public class ScheduleJobServiceImpl extends BaseServiceImpl<ScheduleJobDao, Sche |
|
|
|
CronExpression exp = new CronExpression(dto.getCronExpression()); |
|
|
|
date = exp.getNextValidTimeAfter(new Date()); |
|
|
|
if (date == null) { |
|
|
|
System.out.println("请输入正确的表达式"); |
|
|
|
throw new RenException("请输入正确的表达式"); |
|
|
|
} |
|
|
|
this.insert(entity); |
|
|
|
ScheduleUtils.createScheduleJob(scheduler, entity);ScheduleUtils.createScheduleJob(scheduler, entity); |
|
|
|
}catch (Exception e){ |
|
|
|
throw new RenException(ModuleErrorCode.JOB_ERROR, e); |
|
|
|
throw new RenException("请输入正确的表达式"); |
|
|
|
} |
|
|
|
this.insert(entity); |
|
|
|
ScheduleUtils.createScheduleJob(scheduler, entity); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|