A Scheduler maintains a registery of JobDetail
s and Triggers. 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)
method.
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
year.
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.
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.
This is the main interface of a Quartz Scheduler.
A
Schedulermaintains a registery ofJobDetails andTriggers. Once registered, theScheduleris responible for executingJobs when their associatedTriggers fire (when their scheduled time arrives).Schedulerinstances are produced by aSchedulerFactory. A scheduler that has already been created/initialized can be found and used through the same factory that produced it. After aSchedulerhas been created, it is in "stand-by" mode, and must have itsstart()method called before it will fire anyJobs.Jobs are to be created by the 'client program', by defining a class that implements theJobinterface.JobDetailobjects are then created (also by the client) to define a individual instances of theJob.JobDetailinstances can then be registered with theSchedulervia thescheduleJob(JobDetail, Trigger)oraddJob(JobDetail, boolean)method.Triggers can then be defined to fire individualJobinstances based on given schedules.SimpleTriggers are most useful for one-time firings, or firing at an exact moment in time, with N repeats with a given delay between them.CronTriggers allow scheduling based on time of day, day of week, day of month, and month of year.Jobs andTriggers have a name and group associated with them, which should uniquely identify them within a singleScheduler. The 'group' feature may be useful for creating logical groupings or categorizations ofJobss andTriggerss. If you don't have need for assigning a group to a givenJobsofTriggers, then you can use theDEFAULT_GROUPconstant defined on this interface.Stored
Jobs can also be 'manually' triggered through the use of thetriggerJob(String jobName, String jobGroup)function.Client programs may also be interested in the 'listener' interfaces that are available from Quartz. The
JobListenerinterface provides notifications ofJobexecutions. TheTriggerListenerinterface provides notifications ofTriggerfirings. TheSchedulerListenerinterface provides notifications ofSchedulerevents and errors.The setup/configuration of a
Schedulerinstance is very customizable. Please consult the documentation distributed with Quartz.