在进行quartz任务的暂停恢复时,quartz的任务会把之前因为暂停而错过的任务都会补充调度,为了防止这种情况的发生,我们可以这样设置:
CronScheduleBuilder schedBuilder = CronScheduleBuilder.cronSchedule(cronExpression).withMisfireHandlingInstructionDoNothing();
schedBuilder.withMisfireHandlingInstructionDoNothing();