본문 바로가기
Java

[Java] Quartz Job State

by Real Iron 2019. 3. 18.

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


# WAITING

- 실행시간이 되어 스케줄러가 실행할때까지 기다리는 트리거의 정상 상태

# PAUSED

- scheduler.pauseXXX() 메소드를 사용했다는 의미이다. 해당 트리거는 재시작할때까지 실행되지 않는다.

# BLOCKED

- 이미 실행 중인 상태를 의미한다. 트리거가 실행되는 것을 방지한다. 실행이 완료되면 해당 작업과 관련된 모든 트리거는 WAITING 상태로 돌아간다.

즉, 상태가 BLOCKED 상태일 때, 다른 트리거(또는 이 트리거의 인스턴스)는 이미 트리거의 상태 저장 작업에 대해 실행 중이므로, 다른 트리거가 완료될 때까지 이 트리거가 차단된다.