public List<QuartzJobInfo> getJobs() {
        List<QuartzJobInfo> jobs = new ArrayList<QuartzJobInfo>();
        try {
            List<String> jobGroupNames = this.scheduler.getJobGroupNames();

            List<JobExecutionContext> runningJobs = this.scheduler.getCurrentlyExecutingJobs();

            for (String jobGroupName : jobGroupNames) {
                final Set<JobKey> jobKeys = this.scheduler.getJobKeys(GroupMatcher.jobGroupEquals(jobGroupName));

                for (JobKey jobKey : jobKeys) {
                    // TODO: Find a better solution to return other details of the jobs.
                    // Because getJobDetail tries to instantiate the class of the type that is specified in the
                    // data store. Hence, we only return a list of job names and groups.
                    // JobDetail jobDetail = scheduler.getJobDetail(jobName, jobGroupName);

                    QuartzJobInfo jobInfo = new QuartzJobInfo();
                    jobInfo.setJobName(jobKey.getName());
                    jobInfo.setJobGroupName(jobGroupName);

                    @SuppressWarnings("unchecked")
                    List<Trigger> triggers = (List<Trigger>) this.scheduler.getTriggersOfJob(jobKey);

                    if (AssertUtils.isNotEmpty(triggers)) {
                        for (Trigger trigger : triggers) {
                            QuartzJobTriggerInfo triggerInfo = new QuartzJobTriggerInfo();

                            String triggerName = trigger.getKey().getName();
                            String triggerGroup = trigger.getKey().getGroup();
                            triggerInfo.setTriggerName(triggerName);
                            triggerInfo.setTriggerGroup(triggerGroup);
                            triggerInfo.setLastFireTime(trigger.getPreviousFireTime());
                            triggerInfo.setNextFireTime(trigger.getNextFireTime());

                            triggerInfo.setStatus(this.scheduler.getTriggerState(trigger.getKey()));

                            // check if the trigger is already running
                            for (JobExecutionContext jec : runningJobs) {
                                if (jec.getTrigger().equals(trigger)) {
                                    triggerInfo.setRunning(true);
                                    triggerInfo.setRunTime(jec.getJobRunTime());
                                    break;
                                }
                            }

                            jobInfo.addTriggerInfo(triggerInfo);
                        }
                    }

                    // jobInfo.setDescription(jobDetail.getDescription());
                    jobs.add(jobInfo);
                }
            }
            return jobs;
        } catch (SchedulerException e) {
            logger.error("error getting scheduled job info", e);
        }
        return null;
    }
public List < QuartzJobInfo > getJobs ( ) { List < QuartzJobInfo > jobs = new ArrayList < QuartzJobInfo > ( ) ; try { List < String > jobGroupNames = this . scheduler . getJobGroupNames ( ) ; List < JobExecutionContext > runningJobs = this . scheduler . getCurrentlyExecutingJobs ( ) ; for ( String jobGroupName : jobGroupNames ) { final Set < JobKey > jobKeys = this . scheduler . getJobKeys ( GroupMatcher . jobGroupEquals ( jobGroupName ) ) ; for ( JobKey jobKey : jobKeys ) { QuartzJobInfo jobInfo = new QuartzJobInfo ( ) ; jobInfo . setJobName ( jobKey . getName ( ) ) ; jobInfo . setJobGroupName ( jobGroupName ) ; @ SuppressWarnings ( "unchecked" ) List < Trigger > triggers = ( List < Trigger > ) this . scheduler . getTriggersOfJob ( jobKey ) ; if ( AssertUtils . isNotEmpty ( triggers ) ) { for ( Trigger trigger : triggers ) { QuartzJobTriggerInfo triggerInfo = new QuartzJobTriggerInfo ( ) ; String triggerName = trigger . getKey ( ) . getName ( ) ; String triggerGroup = trigger . getKey ( ) . getGroup ( ) ; triggerInfo . setTriggerName ( triggerName ) ; triggerInfo . setTriggerGroup ( triggerGroup ) ; triggerInfo . setLastFireTime ( trigger . getPreviousFireTime ( ) ) ; triggerInfo . setNextFireTime ( trigger . getNextFireTime ( ) ) ; triggerInfo . setStatus ( this . scheduler . getTriggerState ( trigger . getKey ( ) ) ) ; for ( JobExecutionContext jec : runningJobs ) { if ( jec . getTrigger ( ) . equals ( trigger ) ) { triggerInfo . setRunning ( true ) ; triggerInfo . setRunTime ( jec . getJobRunTime ( ) ) ; break ; } } jobInfo . addTriggerInfo ( triggerInfo ) ; } } jobs . add ( jobInfo ) ; } } return jobs ; } catch ( SchedulerException e ) { logger . error ( "error getting scheduled job info" , e ) ; } return null ; }
@return a {@link List} of all {@link QuartzJobInfo} objects available

@see QuartzService#getJobs()