开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜