Allow CronTrigger to resume from specified timestamp [SPR-14909] #19475
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Jean-Philippe Legault opened SPR-14909 and commented
Allowing ReschedulingRunnable to receive a TriggerContext on creation (instead of always creating a new one) and updating the TaskScheduler interface to add a new signature "ScheduledFuture<?> schedule(Runnable task, Trigger trigger, TriggerContext initialContext);" would allow me to resume a task that was created with a Trigger trough the TaskScheduler.
The current behavior is that a job scheduled with the TaskScheduler with the CronTrigger "0 0 0 */2 * *" task will run in 2 days from now, no matter what. Updating this would allow me to resume a task.
As an example, if I have the CronTrigger "0 0 0 */2 * *", and I know that the last time this task ran was yesterday, I could setup an initial TriggerContext to be passed along the TaskScheduler and used at the creation of the first ReschedulingRunnable instead of using a new one. The following ReschedulingRunnable that will be created would use the current Context, which mean the behavior would not change after the first pass.
Issue Links:
The text was updated successfully, but these errors were encountered: