All Known Implementing Classes:
RemoteMBeanScheduler, JBoss4RMIRemoteMBeanScheduler, StdScheduler, RemoteScheduler
This is the main interface of a Quartz Scheduler.
A Scheduler
maintains a registery of org.quartz.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 Job
s.
Job
s are to be created by the 'client program', by defining
a class that implements the org.quartz.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
Triggers
s. 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.
James
- HouseSharada
- JambulaField Summary | ||
---|---|---|
String | DEFAULT_GROUP |
A (possibly) usefull constant that can be used for specifying the group
that |
String | DEFAULT_MANUAL_TRIGGERS |
A constant |
String | DEFAULT_RECOVERY_GROUP |
A constant
|
String | DEFAULT_FAIL_OVER_GROUP |
A constant
|
String | FAILED_JOB_ORIGINAL_TRIGGER_NAME | A constant JobDataMap key that can be used to retrieve the
name of the original Trigger from a recovery trigger's
data map in the case of a job recovering after a failed scheduler
instance.
|
String | FAILED_JOB_ORIGINAL_TRIGGER_GROUP | A constant JobDataMap key that can be used to retrieve the
group of the original Trigger from a recovery trigger's
data map in the case of a job recovering after a failed scheduler
instance.
|
String | FAILED_JOB_ORIGINAL_TRIGGER_FIRETIME_IN_MILLISECONDS | A constant JobDataMap key that can be used to retrieve the
scheduled fire time of the original Trigger from a recovery
trigger's data map in the case of a job recovering after a failed scheduler
instance.
|
Method from org.quartz.Scheduler Detail: |
---|
Add (register) the given |
Add the given
Listeners in the 'global' list receive notification of execution events
for ALL |
Add the given
Listeners in the 'global' list receive notification of execution events
for ALL |
Add the given
The |
Add the given |
Register the given |
Add the given |
Delete the identified |
Delete the identified |
Get the |
Get the names of all registered |
Returns the |
Return a list of This method is not cluster aware. That is, it will only return Jobs currently executing in this Scheduler instance, not across the entire cluster.
Note that the list returned is an 'instantaneous' snap-shot, and that as
soon as it's returned, the true list of executing jobs may be different.
Also please read the doc associated with |
Get the global |
Get a List containing all of the |
Get the global |
Get a List containing all of the |
Get the |
Get the names of all known |
Get the non-global |
Get a Set containing the names of all the non-global |
Get the names of all the |
Get a Note that the data returned is an 'instantaneous' snap-shot, and that as soon as it's returned, the meta data values may be different. |
Get the names of all |
Returns the instance Id of the |
Get a List containing all of the |
Returns the name of the |
Get the |
Get the names of all known |
Get the non-global |
Get a Set containing the names of all the non-global |
Get the names of all the |
Get the current state of the identified |
Get all |
Request the interruption, within this Scheduler instance, of all
currently executing instances of the identified
If more than one instance of the identified job is currently executing,
the
If you wish to interrupt a specific instance of a job (when more than
one is executing) you can do so by calling
This method is not cluster aware. That is, it will only interrupt instances of the identified InterruptableJob currently executing in this Scheduler instance, not across the entire cluster. |
Reports whether the |
|
Reports whether the |
Note: This only reflects whether |
|
Pause all triggers - similar to calling
When |
Pause the |
Pause all of the The Scheduler will "remember" that the group is paused, and impose the pause on any new jobs that are added to the group while the group is paused. |
Pause the |
Pause all of the The Scheduler will "remember" that the group is paused, and impose the pause on any new triggers that are added to the group while the group is paused. |
Remove the given |
Remove the identifed |
Remove the given |
Remove the identifed |
Remove the identifed |
Remove the given |
Remove the identifed |
Remove (delete) the |
Resume (un-pause) all triggers - similar to calling
If any |
Resume (un-pause) the
If any of the |
Resume (un-pause) all of the
If any of the |
Resume (un-pause) the
If the |
Resume (un-pause) all of the
If any |
Schedule the given |
Add the given
If the given Trigger does not reference any |
Set the
JobFactories may be of use to those wishing to have their application
produce |
Halts the The scheduler cannot be re-started. |
Halts the The scheduler cannot be re-started. |
Temporarily halts the
When The scheduler is not destroyed, and can be re-started at any time. |
Starts the The misfire/recovery process will be started, if it is the initial call to this method on this scheduler instance. |
Trigger the identified |
Trigger the identified |
Trigger the identified |
Trigger the identified |
Remove the indicated |