开发者

Listing jobs that have already executed

Is there any record in Quartz of jobs that have already finis开发者_如何转开发hed, or once they're gone are they really gone?


You can always programmatically loop through job's triggers and see whether they are still valid and going to fire in the future (GetNextFireTimeUtc()).

If job is durable, it will exist in the scheduler even after all triggers have fired and there are none left that would cause the job to run. If job is non-durable it'll be deleted from scheduler after last fire time has been reached.

You could also implement a listener that would create a custom record of job completion based on it's run to database for example.


Quartz has a history plugin tha comes with the standard distrbution. This keeps track of trigger fire times, etc. for you. Very handy for debugging purposes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜