Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does BLOCKED state mean for Quartz trigger

For some Quartz job, it misfired; and after checked the trigger status in database, it shows BLOCKED. What does this BLOCKED mean specifically?

like image 852
user1484819 Avatar asked Sep 09 '14 04:09

user1484819


People also ask

How does quartz trigger work?

Quartz scheduler allows an enterprise to schedule a job at a specified date and time. It allows us to perform the operations to schedule or unschedule the jobs. It provides operations to start or stop or pause the scheduler. It also provides reminder services.

What is misfire in quartz?

A misfire occurs if a persistent trigger “misses” its firing time because of the scheduler being shutdown, or because there are no available threads in Quartz's thread pool for executing the job. The different trigger types have different misfire instructions available to them.


1 Answers

Perhaps some search would help before posting a question here?

WAITING = the normal state of a trigger, waiting for its fire time to arrive and be acquired for firing by a scheduler.

PAUSED = means that one of the scheduler.pauseXXX() methods was used. The trigger is not eligible for being fired until it is resumed.

ACQUIRED = a scheduler node has identified this trigger as the next trigger it will fire - may still be waiting for its fire time to arrive. After it fires the trigger will be updated (per its repeat settings, if any) and placed back into the WAITING state (or be deleted if it does not repeat again).

BLOCKED = the trigger is prevented from being fired because it relates to a StatefulJob that is already executing. When the statefuljob completes its execution, all triggers relating to that job will return to the WAITING state.

In other words, When a state is BLOCKED, another trigger (or an instance of this trigger) is already executing for the trigger's stateful job, so this trigger is blocked until the other trigger is finished.

Link to documentation could be useful for your future reference.http://www.docjar.com/docs/api/org/quartz/Trigger.html

like image 143
Charan Chakravarthi Avatar answered Sep 18 '22 08:09

Charan Chakravarthi