Paul Tomblin
Paul Tomblin

Reputation: 182792

Listing jobs that have already executed

Is there any record in Quartz of jobs that have already finished, or once they're gone are they really gone?

Upvotes: 0

Views: 113

Answers (2)

Michael Deardeuff
Michael Deardeuff

Reputation: 10697

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.

Upvotes: 0

Marko Lahma
Marko Lahma

Reputation: 6884

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.

Upvotes: 2

Related Questions