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

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

public interface IScheduler
Remarks

A IScheduler maintains a registry of JobDetail s and Triggers. Once registered, the IScheduler is responsible for executing IJob s when their associated Trigger 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. JobDetail objects are then created (also by the client) to define a individual instances of the IJob. JobDetail instances can then be registered with the IScheduler via the %IScheduler.ScheduleJob(JobDetail, Trigger)% or %IScheduler.AddJob(JobDetail, bool)% method.

Trigger s can then be defined to fire individual IJob 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.

IJob s and Trigger 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 Triggers. If you don't have need for assigning a group to a given IJobs of Triggers, 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 Trigger firings. The ISchedulerListener interface provides notifications of IScheduler events and errors.

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

See Also