This is the main interface of a Quartz Scheduler.
A Scheduler maintains a registery of JobDetail
s and Trigger s. Once registered, the Scheduler
is responible for executing Job s when their associated
Trigger s fire (when their scheduled time arrives).
Scheduler instances are produced by a SchedulerFactory .
A scheduler that has already been created/initialized can be found and used
through the same factory that produced it. After a Scheduler
has been created, it is in "stand-by" mode, and must have its
start() method called before it will fire any Jobs.
Job s are to be created by the 'client program', by defining
a class that implements the Job
interface. JobDetail objects are then created (also
by the client) to define a individual instances of the Job.
JobDetail instances can then be registered with the Scheduler
via the scheduleJob(JobDetail, Trigger) or addJob(JobDetail, boolean)
Trigger s can then be defined to fire individual Job
instances based on given schedules. SimpleTrigger s are most
useful for one-time firings, or firing at an exact moment in time, with N
repeats with a given delay between them. CronTrigger s allow
scheduling based on time of day, day of week, day of month, and month of
Job s and Trigger s have a name and group
associated with them, which should uniquely identify them within a single
Scheduler . The 'group' feature may be useful for
creating logical groupings or categorizations of Jobs s and
Triggerss. If you don't have need for assigning a group to a
given Jobs of Triggers, then you can use the
DEFAULT_GROUP constant defined on this interface.
Stored Job s can also be 'manually' triggered through the use
of the triggerJob(String jobName, String jobGroup) function.
triggerJob(String jobName, String jobGroup)
Client programs may also be interested in the 'listener' interfaces that are
available from Quartz. The JobListener interface
provides notifications of Job executions. The TriggerListener
interface provides notifications of Trigger firings. The
SchedulerListener interface provides notifications of
Scheduler events and errors.
The setup/configuration of a Scheduler instance is very
customizable. Please consult the documentation distributed with Quartz.