public static boolean checkExists(String jobName) {
        LOG.info("查看任务" + jobName);
        try {
            if (scheduler != null && !scheduler.isShutdown()) {
                JobKey jobKey = JobKey.jobKey(jobName, SchedulingMetaInfoBuilder.DEFAULT_JOB_GROUP);
                return scheduler.checkExists(jobKey);
            } else {
                LOG.info("整个定时器都没在跑");
                return false;
            }
        } catch (SchedulerException e) {
            LOG.error("查看任务[" + jobName + "]失败", e);
        }
        return false;
    }
public static boolean checkExists ( String jobName ) { LOG . info ( "查看任务" + jobName ) ; try { if ( scheduler != null && ! scheduler . isShutdown ( ) ) { JobKey jobKey = JobKey . jobKey ( jobName , SchedulingMetaInfoBuilder . DEFAULT_JOB_GROUP ) ; return scheduler . checkExists ( jobKey ) ; } else { LOG . info ( "整个定时器都没在跑" ) ; return false ; } } catch ( SchedulerException e ) { LOG . error ( "查看任务[" + jobName + "]失败" , e ) ; } return false ; }
suwy增加 判断指定定时器状态