Skip to content

Commit

Permalink
Merge pull request #22717 from ashwinair/fix/21455
Browse files Browse the repository at this point in the history
Fix preserve next fire time of rescheduled job in quartz
  • Loading branch information
gsmet authored Jan 10, 2022
2 parents e0bb150 + d657de4 commit d1bf5f5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ public QuartzScheduler(SchedulerContext context, QuartzSupport quartzSupport, Sc
LOGGER.debugf("Scheduled business method %s with config %s", method.getMethodDescription(),
scheduled);
} else {
scheduler.rescheduleJob(trigger.getKey(), trigger);
org.quartz.Trigger oldTrigger = scheduler.getTrigger(trigger.getKey());
scheduler.rescheduleJob(trigger.getKey(),
triggerBuilder.startAt(oldTrigger.getNextFireTime()).build());
LOGGER.debugf("Rescheduled business method %s with config %s", method.getMethodDescription(),
scheduled);
}
Expand Down

0 comments on commit d1bf5f5

Please sign in to comment.