public class SchedulerService extends Object
Constructor and Description |
---|
SchedulerService(org.quartz.impl.StdSchedulerFactory schedulerFactory)
Create a new scheduler service with the given Quartz Scheduler Factory.
|
Modifier and Type | Method and Description |
---|---|
boolean |
deleteJob(String jobName)
Delete the job for the given name, return true if the job was found.
|
JobAndSimpleTrigger |
getJobAndTrigger(String jobName)
Return the Job and Trigger for the given job name
|
List<JobAndSimpleTrigger> |
getJobAndTriggerList()
Return the list of JobDetail and Trigger associations.
|
org.quartz.JobDetail |
getJobDetail(String jobName)
Return the JobDetail for the given name and group name: "click-group".
|
List<org.quartz.JobDetail> |
getJobDetailList()
Return the list of scheduled JobDetails for the group name: "click-group".
|
boolean |
hasJob(String jobName)
Return true if the scheduler has the named job.
|
boolean |
interruptJob(String jobName)
Interrupt the job for the given name, return true if the job was found.
|
boolean |
isPaused()
Return true if the scheduler is paused.
|
void |
pauseAll()
Pause all the scheduled jobs, and interrupt any currently executing jobs.
|
void |
pauseJob(String jobName)
Pause the job for the given name.
|
void |
resumeAll()
Resume all paused jobs.
|
void |
resumeJob(String jobName)
Resume the job for the given name.
|
void |
scheduleJob(org.quartz.JobDetail jobDetail,
Date startDate,
Date endDate,
int repeatCount,
long repeatInterval)
Schedule a new quartz job with the given job details, start and end date,
repeat count and repeat interval.
|
void |
triggerJob(String jobName)
Trigger the job for the given name.
|
public SchedulerService(org.quartz.impl.StdSchedulerFactory schedulerFactory)
schedulerFactory
- the Quartz Scheduler Factorypublic void scheduleJob(org.quartz.JobDetail jobDetail, Date startDate, Date endDate, int repeatCount, long repeatInterval)
jobDetail
- the quartz job detailstartDate
- the start date of the jobendDate
- the end date of the jobrepeatCount
- the repeat countrepeatInterval
- the job repeat interval in millisecondspublic boolean isPaused()
public void pauseAll()
public void resumeAll()
public void pauseJob(String jobName)
jobName
- the name of the job to pausepublic void resumeJob(String jobName)
jobName
- the name of the job to resumepublic void triggerJob(String jobName)
jobName
- the name of the job to triggerpublic boolean interruptJob(String jobName)
jobName
- the name of the job to interruptpublic boolean deleteJob(String jobName)
jobName
- the name of the job to deletepublic List<org.quartz.JobDetail> getJobDetailList()
public org.quartz.JobDetail getJobDetail(String jobName)
public boolean hasJob(String jobName)
jobName
- the name of the jobpublic List<JobAndSimpleTrigger> getJobAndTriggerList()
public JobAndSimpleTrigger getJobAndTrigger(String jobName)
jobName
- the name of the job