Search code examples
javaquartz-schedulerschedulerstandby

What is the difference between scheduler's standby() and pauseAll()?


I'm using Quartz Scheduler v.1.8.0.

What's the difference between scheduler.standby() and scheduler.pauseAll()?

standby() - Temporarily halts the Scheduler's firing of Triggers.

pauseAll() - Pause all triggers - similar to calling pauseTriggerGroup(group) on every group, however, after using this method resumeAll() must be called to clear the scheduler's state of 'remembering' that all new triggers will be paused as they are added.

Based on what I've understood from the API documentation, I'm not able to easily/clearly differentiate/distinguish from each one of them. I'm seeing both of them serving the same purpose - temporarily pause/halt all the triggers in the scheduler, and subsequently followed by a start() (for standby) or resumeAll() (for pauseAll) to clear the scheduler's state. Is there any other difference?

Hope experts can help me in understanding any subtle difference.


Solution

  • The difference is in trigger misfire instructions applying behavior.

    When you call start() after standby(), any misfires, which appear while standby, will be ignored.

    When you call resumeAll() after pauseAll(), all misfires, which appear while scheduler was paused, will be applyed.