How to check if a job is running in Quartz Framework

狂风中的少年 提交于 2019-12-03 16:06:58

问题


I want to use Quartz Framework in my application. There are two jobs in the scheduler. Now I want to check if job1 is running. How can I check? I have tried to Google it but failed to find the solution.

I am following the first of example from Quartz distribution.


回答1:


You can use scheduler.getCurrentlyExecutingJobs() to get a list of all jobs which are currently running.




回答2:


Please note scheduler.getCurrentlyExecutingJobs() just check for the current scheduler instance,not the whole cluster。



来源:https://stackoverflow.com/questions/8560559/how-to-check-if-a-job-is-running-in-quartz-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!