I'm running Quartz.net in-process with my ASP.NET MVC application.
To start the scheduler you of course have to do something like this:
ISchedulerFactory schedulerFactory;
IScheduler scheduler;
schedulerFactory = new StdSchedulerFactory(properties);
scheduler = schedulerFactory.GetScheduler();
scheduler.Start();
Assuming that I want only a single instance of the scheduler in my application (is this a good assumption?), is it a best practice to simply define scheduler as static so that I have access to the scheduler throughout the application?
Aucun commentaire:
Enregistrer un commentaire