简体   繁体   English

如何检查作业是否在Quartz Framework中运行

[英]How to check if a job is running in Quartz Framework

I want to use Quartz Framework in my application. 我想在我的应用程序中使用Quartz Framework There are two jobs in the scheduler. 调度程序中有两个作业。 Now I want to check if job1 is running. 现在我想检查job1是否正在运行。 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. 我正在关注Quartz发行版中的第一个示例。

您可以使用scheduler.getCurrentlyExecutingJobs()来获取当前正在运行的所有作业的列表。

请注意scheduler.getCurrentlyExecutingJobs()只检查当前的调度程序实例,而不是整个集群。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM