public abstract class Job extends JobContainer implements InterruptableJob
| Constructor and Description |
|---|
Job()
Required no-arg constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Override and place any code in here that should be called no matter what after the Job runs or throws an exception.
|
abstract void |
doRun() |
void |
execute(JobExecutionContext jobExecutionContext)
|
void |
interrupt()
Called by the
when a user interrupts the Job. |
checkTerminated, destroyContext, getJobContext, initContextContainer, setTerminatepublic final void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException
Job
Called by the when a Scheduler fires that is associated with the TriggerJob.
The implementation may wish to set a result object on the JobExecutionContext before this
method exits. The result itself is meaningless to Quartz, but may be informative to or
JobListeners that are watching the job's execution.
TriggerListeners
execute in interface JobJobExecutionException - if there is an exception while executing the job.public void interrupt()
throws UnableToInterruptJobException
InterruptableJob
Called by the when a user interrupts the SchedulerJob.
interrupt in interface InterruptableJobUnableToInterruptJobException - if there is an exception while interrupting the job.public void cleanup()
public abstract void doRun()
throws JobInterruptException
JobInterruptExceptionCopyright © 2011–2017 Knowm Inc.. All rights reserved.