quartz does not perform regular tasks

The reason quartz timing of task execution period of time is not executed

QRTZ_TRIGGERS database tables in the TRIGGER_STATEfield's value is automatically corrected to ERRORthe, quartz timer task is not scanned this ERRORcase.

The reason why ERRORis because there are job bug, resulting in quartz automatic status change, and then quartz does not perform ERRORjob status.

1. Find the cause

The reason the figure below :( approach is to find the cause ERRORwhen changed to a normal state, it will print an error)

TRIGGER_STATE states are:

WAITING:等待 

PAUSED:暂停 

ACQUIRED:正常执行 

BLOCKED:阻塞 

ERROR:错误

Here Insert Picture Description

2. phenomenon database

As shown below:

Here Insert Picture Description

其中TRIGGER_STATEStatus 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_STATEdoes not automatically correct the field after the change, and the timing task is not quartz scan ERRORstate

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_TRIGGERSin the TRIGGER_STATEstatus 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.

Published 27 original articles · won praise 5 · Views 643

Guess you like

Origin blog.csdn.net/qq_37967304/article/details/104515772