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: 1.0.3.3
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, ThreadPool threadPool, JobStore jobStore, string rmiRegistryHost, int rmiRegistryPort)
            

Here is an example of using this method:

            // create the thread pool 
            SimpleThreadPool threadPool = new SimpleThreadPool(maxThreads, Thread.NORM_PRIORITY); 
            threadPool.Initialize(); 
            // create the job store 
            JobStore jobStore = new RAMJobStore(); 
            jobStore.Initialize();
            
            DirectSchedulerFactory.Instance.CreateScheduler("My Quartz Scheduler", "My Instance", threadPool, jobStore, "localhost", 1099); 
            // don't forget to start the scheduler: 
            DirectSchedulerFactory.Instance.GetScheduler("My Quartz Scheduler", "My Instance").start();
            
See Also