如何检查作业是否在Quartz Framework中运行 [英] How to check if a job is running in Quartz Framework

查看:120
本文介绍了如何检查作业是否在Quartz Framework中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序中使用 Quartz Framework 。调度程序中有两个作业。现在我想检查job1是否正在运行。我怎么检查?我曾试图谷歌但未能找到解决方案。

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.

我正在关注Quartz发行版中的第一个示例。

I am following the first of example from Quartz distribution.

推荐答案

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

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

这篇关于如何检查作业是否在Quartz Framework中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆