IScheduler InterfaceQuartz.NET API Documentation
This is the main interface of a Quartz Scheduler.

Namespace: Quartz
Assembly: Quartz (in Quartz.dll) Version:

public interface IScheduler : IDisposable

A IScheduler maintains a registry of IJobDetails and ITriggers. Once registered, the IScheduler is responsible for executing IJob s when their associated ITrigger s fire (when their scheduled time arrives).

IScheduler instances are produced by a ISchedulerFactory. A scheduler that has already been created/initialized can be found and used through the same factory that produced it. After a IScheduler has been created, it is in "stand-by" mode, and must have its Start  method called before it will fire any IJobs.

IJob s are to be created by the 'client program', by defining a class that implements the IJob interface. IJobDetail objects are then created (also by the client) to define a individual instances of the IJob. IJobDetail instances can then be registered with the IScheduler via the %IScheduler.ScheduleJob(JobDetail, Trigger)% or %IScheduler.AddJob(JobDetail, bool)% method.

ITrigger s can then be defined to fire individual IJob instances based on given schedules. ISimpleTrigger 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. ICronTrigger s allow scheduling based on time of day, day of week, day of month, and month of year.

IJob s and ITrigger s have a name and group associated with them, which should uniquely identify them within a single IScheduler. The 'group' feature may be useful for creating logical groupings or categorizations of IJobs and ITriggers. If you don't have need for assigning a group to a given IJobs of ITriggers, then you can use the DefaultGroup constant defined on this interface.

Stored IJob s can also be 'manually' triggered through the use of the %IScheduler.TriggerJob(string, string)% function.

Client programs may also be interested in the 'listener' interfaces that are available from Quartz. The IJobListener interface provides notifications of IJob executions. The ITriggerListener interface provides notifications of ITrigger firings. The ISchedulerListener interface provides notifications of IScheduler events and errors. Listeners can be associated with local schedulers through the IListenerManager interface.

The setup/configuration of a IScheduler instance is very customizable. Please consult the documentation distributed with Quartz.

See Also