The reason quartz timing of task execution period of time is not executed
QRTZ_TRIGGERS database tables in the
TRIGGER_STATE
field's value is automatically corrected toERROR
the, quartz timer task is not scanned thisERROR
case.The reason why
ERROR
is because there are job bug, resulting in quartz automatic status change, and then quartz does not performERROR
job status.
1. Find the cause
The reason the figure below :( approach is to find the cause
ERROR
when changed to a normal state, it will print an error)TRIGGER_STATE states are:
WAITING:等待 PAUSED:暂停 ACQUIRED:正常执行 BLOCKED:阻塞 ERROR:错误
2. phenomenon database
As shown below:
其中TRIGGER_STATE
Status field ERROR
, which can be changed to above WAITING:等待
or ACQUIRED:正常执行
then restart the project, there may be a case in console error log similar to FIG.
3. TRIGGER_STATE
does not automatically correct the field after the change, and the timing task is not quartz scan ERROR
state
Therefore, quartz timer after performing several tasks may encounter a bug in the job automatically modify the state, then the quartz scheduled task is no longer carried out.
4. Solution
Solve quartz timing of job tasks in the bug, then the database
QRTZ_TRIGGERS
in theTRIGGER_STATE
status field changes to a normal state.
The perfect solution to this problem
Small partners, if you have a better solution, please give me a message oh.