Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fetch the "Last Ran At" time for a quartz job

Is there an API to determine the last execution time of a quartz job.

Thanks, Sandhya

like image 290
Sandhya Agarwal Avatar asked Nov 26 '09 07:11

Sandhya Agarwal


People also ask

How does Quartz job work?

Quartz scheduler allows an enterprise to schedule a job at a specified date and time. It allows us to perform the operations to schedule or unschedule the jobs. It provides operations to start or stop or pause the scheduler. It also provides reminder services.


1 Answers

Strictly speaking, a Job doesn't have a fire time, a Trigger does. And Trigger has getPreviousFireTime(). See http://www.quartz-scheduler.org/api/2.2.0/org/quartz/Trigger.html#getPreviousFireTime%28%29

If your Job has multiple triggers, you can retrieve them all and examine their fire times. See the cookbook examples at http://www.quartz-scheduler.org/docs/cookbook/index.html

like image 91
Dennis S. Avatar answered Oct 13 '22 12:10

Dennis S.