DirectSchedulerFactory ClassQuartz.NET API Documentation
A singleton implementation of ISchedulerFactory.
Inheritance Hierarchy

System Object
  Quartz.Impl DirectSchedulerFactory

Namespace: Quartz.Impl
Assembly: Quartz (in Quartz.dll) Version: 2.2.1.400
Syntax

public class DirectSchedulerFactory : ISchedulerFactory
Remarks

Here are some examples of using this class:

To create a scheduler that does not write anything to the database (is not persistent), you can call CreateVolatileScheduler(Int32):

DirectSchedulerFactory.Instance.CreateVolatileScheduler(10); // 10 threads  
// don't forget to start the scheduler: 
DirectSchedulerFactory.Instance.GetScheduler().Start();

Several create methods are provided for convenience. All create methods eventually end up calling the create method with all the parameters:

public void CreateScheduler(string schedulerName, string schedulerInstanceId, IThreadPool threadPool, IJobStore jobStore)

Here is an example of using this method:

// create the thread pool 
SimpleThreadPool threadPool = new SimpleThreadPool(maxThreads, ThreadPriority.Normal); 
threadPool.Initialize(); 
// create the job store 
JobStore jobStore = new RAMJobStore(); 

DirectSchedulerFactory.Instance.CreateScheduler("My Quartz Scheduler", "My Instance", threadPool, jobStore); 
// don't forget to start the scheduler: 
DirectSchedulerFactory.Instance.GetScheduler("My Quartz Scheduler", "My Instance").Start();
See Also