Will Quart Scheduler Start executes the Paused Job

2019-07-23 08:05发布

Hi I'm new to Quartz Scheduler, i'm implementing it for the first time. I would like to know if the scheduler's start call will even execute the paused jobs? or Paused jobs will only be activated by resume call alone and nothing else. Please help me.

1条回答
Melony?
2楼-- · 2019-07-23 08:42

First of all, you can pause a trigger or scheduler, not a job. Do not be confused, that for example IScheduler interface has different pause methods, and one of them for example is PauseJobs(), they all affect triggers:

IScheduler.PauseAll: Pause all triggers - similar to calling PauseTriggers(GroupMatcher) 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.

IScheduler.PauseTriggers: Pause all of the ITriggers in the groups matching.

IScheduler.PauseJobs: Pause all of the IJobDetails in the matching groups - by pausing all of their ITriggers.

IScheduler.PauseJob: Pause the IJobDetail with the given key - by pausing all of its current ITriggers.


The difference between Pause and StandBy methods may help you to understand what and when will be started:

  • The Pause methods are used to pause all the existing triggers you have added to scheduler only. This affect existing triggers only, and scheduler is still RUNNING! Any new job/trigger added will still run, and it's not paused! You would have to call Resume to unflag those paused triggers to get them running again.

  • The Standby is used to place the entire scheduler in "not working" mode, meaning no jobs or triggers will be fire or run, including ones already scheduled, or new ones added. Not until you call Start again.

查看更多
登录 后发表回答