How to check if a job is running in Quartz Framewo

2020-05-30 03:45发布

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.

2条回答
▲ chillily
2楼-- · 2020-05-30 04:04

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

查看更多
Ridiculous、
3楼-- · 2020-05-30 04:16

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

查看更多
登录 后发表回答