Findout how long a job has been running in Quartz
I am writing a kind of start - pause - resume - pause - resume -(at regular intervals) kind of job in Quartz. I am using a SimpleTrigger for initial experimentation.
I would like to how I can find the time a job has been running. I looked at the Scheduler class and there were no methods directly开发者_StackOverflow社区 to find it.
Could some one suggest me a way of finding how long a job has been running?
Thanks, Abi
Call scheduler.getCurrentlyExecutingJobs() to get the set of job's currently executing (or more precisely to get the JobExecutionContext of each).
Then you can call getFireTime() on the JobExecutionContext to see what time the execution started.
精彩评论