Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.quartz
Interface Scheduler

All Known Implementing Classes:
  RemoteScheduler, StdScheduler

public interface Scheduler

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 `Job`s.

`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 `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.

Author:
  James House, Sharada Jambula
See Also:
  `Job`, `JobDetail`, `Trigger`, `JobListener`, `TriggerListener`, `SchedulerListener`

Field Summary
`static String` | `DEFAULT_FAIL_OVER_GROUP` A constant `Trigger` group name used internally by the scheduler - clients should not use the value of this constant ("FAILED_OVER_JOBS") for thename of a `Trigger`'s group.
`static String` | `DEFAULT_GROUP` A (possibly) usefull constant that can be used for specifying the group that `Job` and `Trigger` instances belong to.
`static String` | `DEFAULT_MANUAL_TRIGGERS` A constant `Trigger` group name used internally by the scheduler - clients should not use the value of this constant ("MANUAL_TRIGGER") for thename of a `Trigger`'s group.
`static String` | `DEFAULT_RECOVERY_GROUP` A constant `Trigger` group name used internally by the scheduler - clients should not use the value of this constant ("RECOVERING_JOBS") for thename of a `Trigger`'s group.

Method Summary
`void` | `addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers)` Add (register) the given `Calendar` to the Scheduler.
`void` | `addGlobalJobListener(JobListener jobListener)` Add the given ``JobListener`` to the `Scheduler`'s global list.
`void` | `addGlobalTriggerListener(TriggerListener triggerListener)` Add the given ``TriggerListener`` to the `Scheduler`'s global list.
`void` | `addJob(JobDetail jobDetail, boolean replace)` Add the given `Job` to the Scheduler - with no associated `Trigger`.
`void` | `addJobListener(JobListener jobListener)` Add the given ``JobListener`` to the `Scheduler`'s list, of registered `JobListener`s.
`void` | `addSchedulerListener(SchedulerListener schedulerListener)` Register the given ``SchedulerListener`` with the `Scheduler`.
`void` | `addTriggerListener(TriggerListener triggerListener)` Add the given ``TriggerListener`` to the `Scheduler`'s list, of registered `TriggerListener`s.
`boolean` | `deleteCalendar(String calName)` Delete the identified `Calendar` from the Scheduler.
`boolean` | `deleteJob(String jobName, String groupName)` Delete the identified `Job` from the Scheduler - and any associated `Trigger`s.
`Calendar` | `getCalendar(String calName)` Get the ``Calendar`` instance with the given name.
`String[]` | `getCalendarNames()` Get the names of all registered ``Calendar`s`.
`SchedulerContext` | `getContext()` Returns the `SchedulerContext` of the `Scheduler`.
`List` | `getCurrentlyExecutingJobs()` Return a list of `JobExecutionContext` objects that represent all currently executing Jobs.
`List` | `getGlobalJobListeners()` Get a List containing all of the ``JobListener`` s in the `Scheduler`'sglobal list.
`List` | `getGlobalTriggerListeners()` Get a List containing all of the ``TriggerListener`` s in the `Scheduler`'sglobal list.
`JobDetail` | `getJobDetail(String jobName, String jobGroup)` Get the ``JobDetail`` for the `Job` instance with the given name and group.
`String[]` | `getJobGroupNames()` Get the names of all known ``JobDetail`` groups.
`JobListener` | `getJobListener(String name)` Get the non-global``JobListener`` that has the given name.
`Set` | `getJobListenerNames()` Get a Set containing the names of all the non-global``JobListener`` s registered with the `Scheduler`.
`String[]` | `getJobNames(String groupName)` Get the names of all the ``JobDetail`s` in the given group.
`SchedulerMetaData` | `getMetaData()` Get a `SchedulerMetaData` object describiing the settings and capabilities of the scheduler instance.
`Set` | `getPausedTriggerGroups()` Get the names of all ``Trigger`` groups that are paused.
`String` | `getSchedulerInstanceId()` Returns the instance Id of the `Scheduler`.
`List` | `getSchedulerListeners()` Get a List containing all of the ``SchedulerListener`` s registered with the `Scheduler`.
`String` | `getSchedulerName()` Returns the name of the `Scheduler`.
`Trigger` | `getTrigger(String triggerName, String triggerGroup)` Get the ``Trigger`` instance with the given name and group.
`String[]` | `getTriggerGroupNames()` Get the names of all known ``Trigger`` groups.
`TriggerListener` | `getTriggerListener(String name)` Get the non-global``TriggerListener`` that has the given name.
`Set` | `getTriggerListenerNames()` Get a Set containing the names of all the non-global``TriggerListener`` s registered with the `Scheduler`.
`String[]` | `getTriggerNames(String groupName)` Get the names of all the ``Trigger`s` in the given group.
`Trigger[]` | `getTriggersOfJob(String jobName, String groupName)` Get all ``Trigger`` s that are associated with the identified ``JobDetail``.
`int` | `getTriggerState(String triggerName, String triggerGroup)` Get the current state of the identified ``Trigger``.
`boolean` | `interrupt(String jobName, String groupName)` Request the interruption of all currently executing instances of the identified `Job`, which must be an implementor of the `InterruptableJob` interface.
`boolean` | `isInStandbyMode()` Reports whether the `Scheduler` is in stand-by mode.
`boolean` | `isPaused()` Deprecated.
`boolean` | `isShutdown()` Reports whether the `Scheduler` has been shutdown.
`void` | `pause()` Deprecated. replaced by better-named standby() method.
`void` | `pauseAll()` Pause all triggers - similar to calling `pauseTriggerGroup(group)` on every group, however, after using this method `resumeAll()` must be called to clear the scheduler's state of 'remembering' that all new triggers will be paused as they are added.
`void` | `pauseJob(String jobName, String groupName)` Pause the ``JobDetail`` with the given name - by pausing all of its current `Trigger`s.
`void` | `pauseJobGroup(String groupName)` Pause all of the ``JobDetail`s` in the given group - by pausing all of their `Trigger`s.
`void` | `pauseTrigger(String triggerName, String groupName)` Pause the ``Trigger`` with the given name.
`void` | `pauseTriggerGroup(String groupName)` Pause all of the ``Trigger`s` in the given group.
`boolean` | `removeGlobalJobListener(JobListener jobListener)` Remove the given ``JobListener`` from the `Scheduler`'s list of global listeners.
`boolean` | `removeGlobalTriggerListener(TriggerListener triggerListener)` Remove the given ``TriggerListener`` from the `Scheduler`'s list of global listeners.
`boolean` | `removeJobListener(String name)` Remove the identifed ``JobListener`` from the `Scheduler`'s list of registered listeners.
`boolean` | `removeSchedulerListener(SchedulerListener schedulerListener)` Remove the given ``SchedulerListener`` from the `Scheduler`.
`boolean` | `removeTriggerListener(String name)` Remove the identifed ``TriggerListener`` from the `Scheduler`'s list of registered listeners.
`Date` | `rescheduleJob(String triggerName, String groupName, Trigger newTrigger)` Remove (delete) the ``Trigger`` with the given name, and store the new given one - which must be associated with the same job (the new trigger must have the job name & group specified) - however, the new trigger need not have the same name as the old trigger.
`void` | `resumeAll()` Resume (un-pause) all triggers - similar to calling `resumeTriggerGroup(group)` on every group.
`void` | `resumeJob(String jobName, String groupName)` Resume (un-pause) the ``JobDetail`` with the given name.
`void` | `resumeJobGroup(String groupName)` Resume (un-pause) all of the ``JobDetail`s` in the given group.
`void` | `resumeTrigger(String triggerName, String groupName)` Resume (un-pause) the ``Trigger`` with the given name.
`void` | `resumeTriggerGroup(String groupName)` Resume (un-pause) all of the ``Trigger`s` in the given group.
`Date` | `scheduleJob(JobDetail jobDetail, Trigger trigger)` Add the given ``JobDetail`` to the Scheduler, and associate the given ``Trigger`` with it.
`Date` | `scheduleJob(Trigger trigger)` Schedule the given ``Trigger`` with the `Job` identified by the `Trigger`'s settings.
`void` | `setJobFactory(JobFactory factory)` Set the `JobFactory` that will be responsible for producing instances of `Job` classes.
`void` | `shutdown()` Halts the `Scheduler`'s firing of ``Trigger`s`, and cleans up all resources associated with the Scheduler.
`void` | `shutdown(boolean waitForJobsToComplete)` Halts the `Scheduler`'s firing of ``Trigger`s`, and cleans up all resources associated with the Scheduler.
`void` | `standby()` Temporarily halts the `Scheduler`'s firing of ``Trigger`s`.
`void` | `start()` Starts the `Scheduler`'s threads that fire ``Trigger`s`.
`void` | `triggerJob(String jobName, String groupName)` Trigger the identified ``JobDetail`` (execute it now) - the generated trigger will be non-volatile.
`void` | `triggerJob(String jobName, String groupName, JobDataMap data)` Trigger the identified ``JobDetail`` (execute it now) - the generated trigger will be non-volatile.
`void` | `triggerJobWithVolatileTrigger(String jobName, String groupName)` Trigger the identified ``JobDetail`` (execute it now) - the generated trigger will be volatile.
`void` | `triggerJobWithVolatileTrigger(String jobName, String groupName, JobDataMap data)` Trigger the identified ``JobDetail`` (execute it now) - the generated trigger will be volatile.
`boolean` | `unscheduleJob(String triggerName, String groupName)` Remove the indicated ``Trigger`` from the scheduler.

Field Detail

### DEFAULT_GROUP

    public static final String DEFAULT_GROUP

  A (possibly) usefull constant that can be used for specifying the group that `Job` and `Trigger` instances belong to.

  See Also:
    Constant Field Values

### DEFAULT_MANUAL_TRIGGERS

    public static final String DEFAULT_MANUAL_TRIGGERS

  A constant `Trigger` group name used internally by the scheduler - clients should not use the value of this constant ("MANUAL_TRIGGER") for thename of a `Trigger`'s group.

  See Also:
    Constant Field Values

### DEFAULT_RECOVERY_GROUP

    public static final String DEFAULT_RECOVERY_GROUP

  A constant `Trigger` group name used internally by the scheduler - clients should not use the value of this constant ("RECOVERING_JOBS") for thename of a `Trigger`'s group.

  See Also:
    Constant Field Values

### DEFAULT_FAIL_OVER_GROUP

    public static final String DEFAULT_FAIL_OVER_GROUP

  A constant `Trigger` group name used internally by the scheduler - clients should not use the value of this constant ("FAILED_OVER_JOBS") for thename of a `Trigger`'s group.

  See Also:
    Constant Field Values

Method Detail

### getSchedulerName

    public String getSchedulerName()
                            throws SchedulerException

  Returns the name of the `Scheduler`.

  Throws:
    `SchedulerException`

### getSchedulerInstanceId

    public String getSchedulerInstanceId()
                                  throws SchedulerException

  Returns the instance Id of the `Scheduler`.

  Throws:
    `SchedulerException`

### getContext

    public SchedulerContext getContext()
                                throws SchedulerException

  Returns the `SchedulerContext` of the `Scheduler`.

  Throws:
    `SchedulerException`

### start

    public void start()
               throws SchedulerException

  Starts the `Scheduler`'s threads that fire ``Trigger`s`. When a scheduler is first created it is in "stand-by" mode, and will not fire triggers. The scheduler can also be put into stand-by mode by calling the `standby()` method.

  The misfire/recovery process will be started, if it is the initial call to this method on this scheduler instance.

  Throws:
    `SchedulerException` - if `shutdown()` has been called, or there is an error within the `Scheduler`.
  See Also:
    `standby()`, `shutdown()`

### standby

    public void standby()
                 throws SchedulerException

  Temporarily halts the `Scheduler`'s firing of ``Trigger`s`.

  When `start()` is called (to bring the scheduler out of stand-by mode), trigger misfire instructions will NOT be applied during the execution of the `start()` method - any misfires will be detected immediately afterward (by the `JobStore`'s normal process).

  The scheduler is not destroyed, and can be re-started at any time.

  Throws:
    `SchedulerException`
  See Also:
    `start()`, `pauseAll()`

### pause

    public void pause()
               throws SchedulerException

  Deprecated. replaced by better-named standby() method.

  Throws:
    `SchedulerException`
  See Also:
    `standby()`

### isInStandbyMode

    public boolean isInStandbyMode()
                            throws SchedulerException

  Reports whether the `Scheduler` is in stand-by mode.

  Throws:
    `SchedulerException`
  See Also:
    `standby()`, `start()`

### isPaused

    public boolean isPaused()
                     throws SchedulerException

  Deprecated.

  Throws:
    `SchedulerException`
  See Also:
    `isInStandbyMode()`

### shutdown

    public void shutdown()
                  throws SchedulerException

  Halts the `Scheduler`'s firing of ``Trigger`s`, and cleans up all resources associated with the Scheduler. Equivalent to `shutdown(false)`.

  The scheduler cannot be re-started.

  Throws:
    `SchedulerException`
  See Also:
    `shutdown(boolean)`

### shutdown

    public void shutdown(boolean waitForJobsToComplete)
                  throws SchedulerException

  Halts the `Scheduler`'s firing of ``Trigger`s`, and cleans up all resources associated with the Scheduler.

  The scheduler cannot be re-started.

  Parameters:
    `waitForJobsToComplete` - if `true` the scheduler will not allow this method to return until all currently executing jobs have completed.
  Throws:
    `SchedulerException`
  See Also:
    `shutdown()`

### isShutdown

    public boolean isShutdown()
                       throws SchedulerException

  Reports whether the `Scheduler` has been shutdown.

  Throws:
    `SchedulerException`

### getMetaData

    public SchedulerMetaData getMetaData()
                                  throws SchedulerException

  Get a `SchedulerMetaData` object describiing the settings and capabilities of the scheduler instance.

  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.

  Throws:
    `SchedulerException`

### getCurrentlyExecutingJobs

    public List getCurrentlyExecutingJobs()
                                   throws SchedulerException

  Return a list of `JobExecutionContext` objects that represent all currently executing Jobs.

  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 `JobExecutionContext`- especially if you're using RMI.

  Throws:
    `SchedulerException`
  See Also:
    `JobExecutionContext`

### setJobFactory

    public void setJobFactory(JobFactory factory)
                       throws SchedulerException

  Set the `JobFactory` that will be responsible for producing instances of `Job` classes.

  JobFactories may be of use to those wishing to have their application produce `Job` instances via some special mechanism, such as to give the opertunity for dependency injection.

  Throws:
    `SchedulerException`
  See Also:
    `org.quart.spi.JobFactory`

### scheduleJob

    public Date scheduleJob(JobDetail jobDetail,
                            Trigger trigger)
                     throws SchedulerException

  Add the given ``JobDetail`` to the Scheduler, and associate the given ``Trigger`` with it.

  If the given Trigger does not reference any `Job`, then it will be set to reference the Job passed with it into this method.

  Throws:
    `SchedulerException` - if the Job or Trigger cannot be added to the Scheduler, or there is an internal Scheduler error.

### scheduleJob

    public Date scheduleJob(Trigger trigger)
                     throws SchedulerException

  Schedule the given ``Trigger`` with the `Job` identified by the `Trigger`'s settings.

  Throws:
    `SchedulerException` - if the indicated Job does not exist, or the Trigger cannot be added to the Scheduler, or there is an internal Scheduler error.

### unscheduleJob

    public boolean unscheduleJob(String triggerName,
                                 String groupName)
                          throws SchedulerException

  Remove the indicated ``Trigger`` from the scheduler.

  Throws:
    `SchedulerException`

### rescheduleJob

    public Date rescheduleJob(String triggerName,
                              String groupName,
                              Trigger newTrigger)
                       throws SchedulerException

  Remove (delete) the ``Trigger`` with the given name, and store the new given one - which must be associated with the same job (the new trigger must have the job name & group specified) - however, the new trigger need not have the same name as the old trigger.

  Parameters:
    `triggerName` - The name of the `Trigger` to be replaced.
    `groupName` - The group name of the `Trigger` to be replaced.
    `newTrigger` - The new `Trigger` to be stored.
  Returns:
    `null` if a `Trigger` with the given name & group was not found and removed from the store, otherwise the first fire time of the newly scheduled trigger.
  Throws:
    `SchedulerException`

### addJob

    public void addJob(JobDetail jobDetail,
                       boolean replace)
                throws SchedulerException

  Add the given `Job` to the Scheduler - with no associated `Trigger`. The `Job` will be 'dormant' until it is scheduled with a `Trigger`, or `Scheduler.triggerJob()` is called for it.

  The `Job` must by definition be 'durable', if it is not, SchedulerException will be thrown.

  Throws:
    `SchedulerException` - if there is an internal Scheduler error, or if the Job is not durable, or a Job with the same name already exists, and `replace` is `false`.

### deleteJob

    public boolean deleteJob(String jobName,
                             String groupName)
                      throws SchedulerException

  Delete the identified `Job` from the Scheduler - and any associated `Trigger`s.

  Returns:
    true if the Job was found and deleted.
  Throws:
    `SchedulerException` - if there is an internal Scheduler error.

### triggerJob

    public void triggerJob(String jobName,
                           String groupName)
                    throws SchedulerException

  Trigger the identified ``JobDetail`` (execute it now) - the generated trigger will be non-volatile.

  Throws:
    `SchedulerException`

### triggerJobWithVolatileTrigger

    public void triggerJobWithVolatileTrigger(String jobName,
                                              String groupName)
                                       throws SchedulerException

  Trigger the identified ``JobDetail`` (execute it now) - the generated trigger will be volatile.

  Throws:
    `SchedulerException`

### triggerJob

    public void triggerJob(String jobName,
                           String groupName,
                           JobDataMap data)
                    throws SchedulerException

  Trigger the identified ``JobDetail`` (execute it now) - the generated trigger will be non-volatile.

  Parameters:
    `jobName` - the name of the Job to trigger
    `groupName` - the group name of the Job to trigger
    `data` - the (possibly `null`) JobDataMap to be associated with the trigger that fires the job immediately.
  Throws:
    `SchedulerException`

### triggerJobWithVolatileTrigger

    public void triggerJobWithVolatileTrigger(String jobName,
                                              String groupName,
                                              JobDataMap data)
                                       throws SchedulerException

  Trigger the identified ``JobDetail`` (execute it now) - the generated trigger will be volatile.

  Parameters:
    `jobName` - the name of the Job to trigger
    `groupName` - the group name of the Job to trigger
    `data` - the (possibly `null`) JobDataMap to be associated with the trigger that fires the job immediately.
  Throws:
    `SchedulerException`

### pauseJob

    public void pauseJob(String jobName,
                         String groupName)
                  throws SchedulerException

  Pause the ``JobDetail`` with the given name - by pausing all of its current `Trigger`s.

  Throws:
    `SchedulerException`
  See Also:
    `resumeJob(String, String)`

### pauseJobGroup

    public void pauseJobGroup(String groupName)
                       throws SchedulerException

  Pause all of the ``JobDetail`s` in the given group - by pausing all of their `Trigger`s.

  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.

  Throws:
    `SchedulerException`
  See Also:
    `resumeJobGroup(String)`

### pauseTrigger

    public void pauseTrigger(String triggerName,
                             String groupName)
                      throws SchedulerException

  Pause the ``Trigger`` with the given name.

  Throws:
    `SchedulerException`
  See Also:
    `resumeTrigger(String, String)`

### pauseTriggerGroup

    public void pauseTriggerGroup(String groupName)
                           throws SchedulerException

  Pause all of the ``Trigger`s` in the given group.

  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.

  Throws:
    `SchedulerException`
  See Also:
    `resumeTriggerGroup(String)`

### resumeJob

    public void resumeJob(String jobName,
                          String groupName)
                   throws SchedulerException

  Resume (un-pause) the ``JobDetail`` with the given name.

  If any of the `Job`'s`Trigger` s missed one or more fire-times, then the `Trigger`'s misfire instruction will be applied.

  Throws:
    `SchedulerException`
  See Also:
    `pauseJob(String, String)`

### resumeJobGroup

    public void resumeJobGroup(String groupName)
                        throws SchedulerException

  Resume (un-pause) all of the ``JobDetail`s` in the given group.

  If any of the `Job` s had `Trigger` s that missed one or more fire-times, then the `Trigger`'s misfire instruction will be applied.

  Throws:
    `SchedulerException`
  See Also:
    `pauseJobGroup(String)`

### resumeTrigger

    public void resumeTrigger(String triggerName,
                              String groupName)
                       throws SchedulerException

  Resume (un-pause) the ``Trigger`` with the given name.

  If the `Trigger` missed one or more fire-times, then the `Trigger`'s misfire instruction will be applied.

  Throws:
    `SchedulerException`
  See Also:
    `pauseTrigger(String, String)`

### resumeTriggerGroup

    public void resumeTriggerGroup(String groupName)
                            throws SchedulerException

  Resume (un-pause) all of the ``Trigger`s` in the given group.

  If any `Trigger` missed one or more fire-times, then the `Trigger`'s misfire instruction will be applied.

  Throws:
    `SchedulerException`
  See Also:
    `pauseTriggerGroup(String)`

### pauseAll

    public void pauseAll()
                  throws SchedulerException

  Pause all triggers - similar to calling `pauseTriggerGroup(group)` on every group, however, after using this method `resumeAll()` must be called to clear the scheduler's state of 'remembering' that all new triggers will be paused as they are added.

  When `resumeAll()` is called (to un-pause), trigger misfire instructions WILL be applied.

  Throws:
    `SchedulerException`
  See Also:
    `resumeAll()`, `pauseTriggerGroup(String)`, `standby()`

### resumeAll

    public void resumeAll()
                   throws SchedulerException

  Resume (un-pause) all triggers - similar to calling `resumeTriggerGroup(group)` on every group.

  If any `Trigger` missed one or more fire-times, then the `Trigger`'s misfire instruction will be applied.

  Throws:
    `SchedulerException`
  See Also:
    `pauseAll()`

### getJobGroupNames

    public String[] getJobGroupNames()
                              throws SchedulerException

  Get the names of all known ``JobDetail`` groups.

  Throws:
    `SchedulerException`

### getJobNames

    public String[] getJobNames(String groupName)
                         throws SchedulerException

  Get the names of all the ``JobDetail`s` in the given group.

  Throws:
    `SchedulerException`

### getTriggersOfJob

    public Trigger[] getTriggersOfJob(String jobName,
                                      String groupName)
                               throws SchedulerException

  Get all ``Trigger`` s that are associated with the identified ``JobDetail``.

  Throws:
    `SchedulerException`

### getTriggerGroupNames

    public String[] getTriggerGroupNames()
                                  throws SchedulerException

  Get the names of all known ``Trigger`` groups.

  Throws:
    `SchedulerException`

### getTriggerNames

    public String[] getTriggerNames(String groupName)
                             throws SchedulerException

  Get the names of all the ``Trigger`s` in the given group.

  Throws:
    `SchedulerException`

### getPausedTriggerGroups

    public Set getPausedTriggerGroups()
                               throws SchedulerException

  Get the names of all ``Trigger`` groups that are paused.

  Returns:
  Throws:
    `SchedulerException`

### getJobDetail

    public JobDetail getJobDetail(String jobName,
                                  String jobGroup)
                           throws SchedulerException

  Get the ``JobDetail`` for the `Job` instance with the given name and group.

  Throws:
    `SchedulerException`

### getTrigger

    public Trigger getTrigger(String triggerName,
                              String triggerGroup)
                       throws SchedulerException

  Get the ``Trigger`` instance with the given name and group.

  Throws:
    `SchedulerException`

### getTriggerState

    public int getTriggerState(String triggerName,
                               String triggerGroup)
                        throws SchedulerException

  Get the current state of the identified ``Trigger``.

  Throws:
    `SchedulerException`
  See Also:
    `Trigger.STATE_NORMAL`, `Trigger.STATE_PAUSED`, `Trigger.STATE_COMPLETE`, `Trigger.STATE_ERROR`, `Trigger.STATE_BLOCKED`, `Trigger.STATE_NONE`

### addCalendar

    public void addCalendar(String calName,
                            Calendar calendar,
                            boolean replace,
                            boolean updateTriggers)
                     throws SchedulerException

  Add (register) the given `Calendar` to the Scheduler.

  Parameters:
    `updateTriggers` - whether or not to update existing triggers that referenced the already existing calendar so that they are 'correct' based on the new trigger.
  Throws:
    `SchedulerException` - if there is an internal Scheduler error, or a Calendar with the same name already exists, and `replace` is `false`.

### deleteCalendar

    public boolean deleteCalendar(String calName)
                           throws SchedulerException

  Delete the identified `Calendar` from the Scheduler.

  Returns:
    true if the Calendar was found and deleted.
  Throws:
    `SchedulerException` - if there is an internal Scheduler error.

### getCalendar

    public Calendar getCalendar(String calName)
                         throws SchedulerException

  Get the ``Calendar`` instance with the given name.

  Throws:
    `SchedulerException`

### getCalendarNames

    public String[] getCalendarNames()
                              throws SchedulerException

  Get the names of all registered ``Calendar`s`.

  Throws:
    `SchedulerException`

### interrupt

    public boolean interrupt(String jobName,
                             String groupName)
                      throws UnableToInterruptJobException

  Request the interruption of all currently executing instances of the identified `Job`, which must be an implementor of the `InterruptableJob` interface.

  If more than one instance of the identified job is currently executing, the `InterruptableJob#interrupt()` method will be called on each instance. However, there is a limitation that in the case that `interrupt()` on one instances throws an exception, all remaining instances (that have not yet been interrupted) will not have their `interrupt()` method called.

  If you wish to interrupt a specific instance of a job (when more than one is executing) you can do so by calling ``getCurrentlyExecutingJobs()`` to obtain a handle to the job instance, and then invoke `interrupt()` on it yourself.

  Parameters:
    `jobName` -
    `groupName` -
  Returns:
    true is at least one instance of the identified job was found and interrupted.
  Throws:
    `UnableToInterruptJobException` - if the job does not implement `InterruptableJob`, or there is an exception while interrupting the job.
  See Also:
    `InterruptableJob.interrupt()`, `getCurrentlyExecutingJobs()`

### addGlobalJobListener

    public void addGlobalJobListener(JobListener jobListener)
                              throws SchedulerException

  Add the given ``JobListener`` to the `Scheduler`'s global list.

  Listeners in the 'global' list receive notification of execution events for ALL ``JobDetail``s.

  Throws:
    `SchedulerException`

### addJobListener

    public void addJobListener(JobListener jobListener)
                        throws SchedulerException

  Add the given ``JobListener`` to the `Scheduler`'s list, of registered `JobListener`s.

  Throws:
    `SchedulerException`

### removeGlobalJobListener

    public boolean removeGlobalJobListener(JobListener jobListener)
                                    throws SchedulerException

  Remove the given ``JobListener`` from the `Scheduler`'s list of global listeners.

  Returns:
    true if the identifed listener was found in the list, and removed.
  Throws:
    `SchedulerException`

### removeJobListener

    public boolean removeJobListener(String name)
                              throws SchedulerException

  Remove the identifed ``JobListener`` from the `Scheduler`'s list of registered listeners.

  Returns:
    true if the identifed listener was found in the list, and removed.
  Throws:
    `SchedulerException`

### getGlobalJobListeners

    public List getGlobalJobListeners()
                               throws SchedulerException

  Get a List containing all of the ``JobListener`` s in the `Scheduler`'sglobal list.

  Throws:
    `SchedulerException`

### getJobListenerNames

    public Set getJobListenerNames()
                            throws SchedulerException

  Get a Set containing the names of all the non-global``JobListener`` s registered with the `Scheduler`.

  Throws:
    `SchedulerException`

### getJobListener

    public JobListener getJobListener(String name)
                               throws SchedulerException

  Get the non-global``JobListener`` that has the given name.

  Throws:
    `SchedulerException`

### addGlobalTriggerListener

    public void addGlobalTriggerListener(TriggerListener triggerListener)
                                  throws SchedulerException

  Add the given ``TriggerListener`` to the `Scheduler`'s global list.

  Listeners in the 'global' list receive notification of execution events for ALL ``Trigger``s.

  Throws:
    `SchedulerException`

### addTriggerListener

    public void addTriggerListener(TriggerListener triggerListener)
                            throws SchedulerException

  Add the given ``TriggerListener`` to the `Scheduler`'s list, of registered `TriggerListener`s.

  Throws:
    `SchedulerException`

### removeGlobalTriggerListener

    public boolean removeGlobalTriggerListener(TriggerListener triggerListener)
                                        throws SchedulerException

  Remove the given ``TriggerListener`` from the `Scheduler`'s list of global listeners.

  Returns:
    true if the identifed listener was found in the list, and removed.
  Throws:
    `SchedulerException`

### removeTriggerListener

    public boolean removeTriggerListener(String name)
                                  throws SchedulerException

  Remove the identifed ``TriggerListener`` from the `Scheduler`'s list of registered listeners.

  Returns:
    true if the identifed listener was found in the list, and removed.
  Throws:
    `SchedulerException`

### getGlobalTriggerListeners

    public List getGlobalTriggerListeners()
                                   throws SchedulerException

  Get a List containing all of the ``TriggerListener`` s in the `Scheduler`'sglobal list.

  Throws:
    `SchedulerException`

### getTriggerListenerNames

    public Set getTriggerListenerNames()
                                throws SchedulerException

  Get a Set containing the names of all the non-global``TriggerListener`` s registered with the `Scheduler`.

  Throws:
    `SchedulerException`

### getTriggerListener

    public TriggerListener getTriggerListener(String name)
                                       throws SchedulerException

  Get the non-global``TriggerListener`` that has the given name.

  Throws:
    `SchedulerException`

### addSchedulerListener

    public void addSchedulerListener(SchedulerListener schedulerListener)
                              throws SchedulerException

  Register the given ``SchedulerListener`` with the `Scheduler`.

  Throws:
    `SchedulerException`

### removeSchedulerListener

    public boolean removeSchedulerListener(SchedulerListener schedulerListener)
                                    throws SchedulerException

  Remove the given ``SchedulerListener`` from the `Scheduler`.

  Returns:
    true if the identifed listener was found in the list, and removed.
  Throws:
    `SchedulerException`

### getSchedulerListeners

    public List getSchedulerListeners()
                               throws SchedulerException

  Get a List containing all of the ``SchedulerListener`` s registered with the `Scheduler`.

  Throws:
    `SchedulerException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Quartz Enterprise Job Scheduler Project Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD