How to check whether Quartz cron job is running?
问题 How to check if scheduled Quartz cron job is running or not? Is there any API to do the checking? 回答1: scheduler.getCurrentlyExecutingJobs() should work in most case. But remember not to use it in Job class, for it use ExecutingJobsManager(a JobListener) to put the running job to a HashMap, which run before the job class, so use this method to check job is running will definitely return true. One simple approach is to check that fire times are different: public static boolean isJobRunning