Using Quartz.Net in an asp.net application

I have a Quartz scheduler using AdoDataStore, which runs as a standalone Windows service on port 555. I have an asp.net application that assigns tasks for this scheduler. What are the configurations that I have to do on the ASP.NET side for job scheduling? Any help is appreciated.

This is a service configuration,

<!-- Configure Thread Pool --> <add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" /> <add key="quartz.threadPool.threadCount" value="10" /> <add key="quartz.threadPool.threadPriority" value="Normal" /> <!-- Configure Job Store --> <add key="quartz.jobStore.misfireThreshold" value="60000" /> <add key="quartz.jobStore.type" value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" /> <add key="quartz.jobStore.useProperties" value="true" /> <add key="quartz.jobStore.dataSource" value="default" /> <add key="quartz.jobStore.tablePrefix" value="QRTZ_" /> <add key="quartz.jobStore.driverDelegateType" value="Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz" /> <add key="quartz.jobStore.lockHandler.type" value="Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz" /> <add key="quartz.dataSource.default.connectionString" value="Server=server\MSSQLEXPRESS;Database=QuartzServerDB;Trusted_Connection=True;" /> <add key="quartz.dataSource.default.provider" value="SqlServer-20" /> <!--export this server to remoting context--> <add key="quartz.scheduler.exporter.type" value="Quartz.Simpl.RemotingSchedulerExporter, Quartz" /> <add key="quartz.scheduler.exporter.port" value="555" /> <add key="quartz.scheduler.exporter.bindName" value="QuartzScheduler" /> <add key="quartz.scheduler.exporter.channelType" value="tcp" /> 

So, how will the asp.net side configuration be?

+4
source share
1 answer

I think the answer here may help. You can see example 12 in the Quartz.2008 project.

Your configuration file should be as follows:

 <!-- Configure Thread Pool --> <add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" /> <add key="quartz.threadPool.threadCount" value="5" /> <add key="quartz.threadPool.threadPriority" value="Normal" /> <!--Configure remoting expoter--> <add key="quartz.scheduler.proxy" value="true" /> <add key="quartz.scheduler.proxy.address" value="tcp://localhost:555/QuartzScheduler" /> 

Remember: you will never start the scheduler.

Since you host Quartz.net in ASP.NET, you must define your scheduler as singleton.

+4
source

All Articles