agave-common/common-api/src/main/java/org/iplantc/service/common/quartz/util/QuartzUtility.java
/**
     * lists scheduled jobs.s
     *
     * @return list of current job descriptions
     */
lists scheduled jobs.s
@return list of current job descriptions
lists scheduled jobs . s @return list of current job descriptions
private List<JobDescription> listJobs() {
        final List<JobDescription> descriptions = new ArrayList<JobDescription>();
        try {
        	List<JobExecutionContext> currentJobs = scheduler().getCurrentlyExecutingJobs();
            for (String group : scheduler().getJobGroupNames()) {
            	for (JobKey jobKey : scheduler().getJobKeys(GroupMatcher.groupEquals(group))) {
            		JobDescription jobDescription = new JobDescription();
                    JobDetail jd = scheduler().getJobDetail(jobKey);
                    final String jname = ((JobDetailImpl) jd).getName();
                    jobDescription.setName(jname);
                    jobDescription.setDescription(((JobDetailImpl) jd).getFullName() + nvl(jd.getDescription()));
                    jobDescription.setGroupName(((JobDetailImpl) jd).getGroup());
                    jobDescription.setClassName(jd.getJobClass().getName());
                    jobDescription.setPaused(allPaused || pausedJobs.contains(jd.getKey().getName()));
                    for (Trigger trigger : scheduler().getTriggersOfJob(jobKey)) {
                        if (trigger instanceof CronTrigger) {
                            jobDescription.addCronExpression(
                                    new SimpleCronExpression(
                                            trigger.getKey().getName(),
                                            ((CronTrigger) trigger).getCronExpression(),
                                            allPaused
                                                    || pausedJobs.contains(jd.getKey().getName())
                                                    || pausedTriggers.contains(trigger.getKey().getName())
                                    ));
                        } else if (trigger instanceof SimpleTrigger) {
                        	jobDescription.addCronExpression(
                        			new SimpleCronExpression(
                                            trigger.getKey().getName(),
                                            "" + ((SimpleTrigger) trigger).getRepeatInterval(),
                                            allPaused
                                                    || pausedJobs.contains(jd.getKey().getName())
                                                    || pausedTriggers.contains(trigger.getKey().getName())
                                    ));
                        }
                    }
                    KeyMatcher<JobKey> matcher = keyEquals(jobKey);
            		for(JobExecutionContext jec: currentJobs) {
            			if (matcher.isMatch(jec.getJobDetail().getKey())) {
            				jobDescription.addActiveJobDescription(new ActiveJobDescription(jec));
            				break;
            			}
            		}
                    jobs.put(jname.toLowerCase(), descriptions);
                    descriptions.add(jobDescription);
                }
            }
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            throw new RuntimeException(e);
        }
        return descriptions;
    }
private List < JobDescription > listJobs ( ) { final List < JobDescription > descriptions = new ArrayList < JobDescription > ( ) ; try { List < JobExecutionContext > currentJobs = scheduler ( ) . getCurrentlyExecutingJobs ( ) ; for ( String group : scheduler ( ) . getJobGroupNames ( ) ) { for ( JobKey jobKey : scheduler ( ) . getJobKeys ( GroupMatcher . groupEquals ( group ) ) ) { JobDescription jobDescription = new JobDescription ( ) ; JobDetail jd = scheduler ( ) . getJobDetail ( jobKey ) ; final String jname = ( ( JobDetailImpl ) jd ) . getName ( ) ; jobDescription . setName ( jname ) ; jobDescription . setDescription ( ( ( JobDetailImpl ) jd ) . getFullName ( ) + nvl ( jd . getDescription ( ) ) ) ; jobDescription . setGroupName ( ( ( JobDetailImpl ) jd ) . getGroup ( ) ) ; jobDescription . setClassName ( jd . getJobClass ( ) . getName ( ) ) ; jobDescription . setPaused ( allPaused || pausedJobs . contains ( jd . getKey ( ) . getName ( ) ) ) ; for ( Trigger trigger : scheduler ( ) . getTriggersOfJob ( jobKey ) ) { if ( trigger instanceof CronTrigger ) { jobDescription . addCronExpression ( new SimpleCronExpression ( trigger . getKey ( ) . getName ( ) , ( ( CronTrigger ) trigger ) . getCronExpression ( ) , allPaused || pausedJobs . contains ( jd . getKey ( ) . getName ( ) ) || pausedTriggers . contains ( trigger . getKey ( ) . getName ( ) ) ) ) ; } else if ( trigger instanceof SimpleTrigger ) { jobDescription . addCronExpression ( new SimpleCronExpression ( trigger . getKey ( ) . getName ( ) , "" + ( ( SimpleTrigger ) trigger ) . getRepeatInterval ( ) , allPaused || pausedJobs . contains ( jd . getKey ( ) . getName ( ) ) || pausedTriggers . contains ( trigger . getKey ( ) . getName ( ) ) ) ) ; } } KeyMatcher < JobKey > matcher = keyEquals ( jobKey ) ; for ( JobExecutionContext jec : currentJobs ) { if ( matcher . isMatch ( jec . getJobDetail ( ) . getKey ( ) ) ) { jobDescription . addActiveJobDescription ( new ActiveJobDescription ( jec ) ) ; break ; } } jobs . put ( jname . toLowerCase ( ) , descriptions ) ; descriptions . add ( jobDescription ) ; } } } catch ( Exception e ) { log . error ( e . getMessage ( ) , e ) ; throw new RuntimeException ( e ) ; } return descriptions ; }
lists scheduled jobs.s
 @return list of current job descriptions
lists scheduled jobs . s @return list of current job descriptions
// enumerate each job in group