I try to configure my scheduler to ADO.NET Job Store, but I don't
understand some attributes in the tutorial (http://
quartznet.sourceforge.net/tutorial_lesson_9.html)... So I try this in
my Web.config:
<quartz>
<add key="org.quartz.jobStore.class"
value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz"/>
<add key="quartz.jobStore.driverDelegateClass"
value="Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz"/>
<add key="quartz.jobStore.tablePrefix" value="QRTZ_"/>
<add key="quartz.jobStore.dataSource" value="myDS"/>
<add key="quartz.dataSource.myDS.connectionString"
value="Server=MYHOST\SQLEXPRESS;Initial
Catalog=JOBSCHEDULER;Integrated Security=True"/>
<add key="quartz.dataSource.myDS.provider" value="SqlServer-20"/>
<add key="quartz.jobStore.useProperties" value="true"/>
<add key="quartz.scheduler.instanceName" value="MyScheduler"/>
<add key="quartz.threadPool.type"
value="Quartz.Simpl.SimpleThreadPool, Quartz"/>
<add key="quartz.threadPool.threadCount" value="10"/>
<add key="quartz.threadPool.threadPriority" value="2"/>
<add key="quartz.jobStore.misfireThreshold" value="500"/>
</quartz>
What is wrong in this config file??? - Somebody can give me an example
configuration of ADO.NET Job Store?
Thanks!
Sorry for the trouble, tutorial will be updated with the next release.
-Marko
Thanks! Now I tryed this:
NameValueCollection properties = new
NameValueCollection();
properties["quartz.scheduler.instanceName"] =
"TestScheduler";
properties["quartz.scheduler.instanceId"] =
"instance_one";
properties["quartz.threadPool.type"] =
"Quartz.Simpl.SimpleThreadPool, Quartz";
properties["quartz.threadPool.threadCount"] = "5";
properties["quartz.threadPool.threadPriority"] = "Normal";
properties["quartz.jobStore.misfireThreshold"] = "60000";
properties["quartz.jobStore.type"] =
"Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
properties["quartz.jobStore.driverDelegateType"] =
"Quartz.Impl.AdoJobStore.MSSQLDelegate, Quartz";
properties["quartz.jobStore.useProperties"] = "false";
properties["quartz.jobStore.dataSource"] = "default";
properties["quartz.jobStore.tablePrefix"] = "QRTZ_";
properties["quartz.jobStore.clustered"] = "true";
// if running MS SQL Server we need this
properties["quartz.jobStore.selectWithLockSQL"] = "SELECT
* FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = @lockName";
properties["quartz.dataSource.default.connectionString"] =
ConfigurationManager.ConnectionStrings["JOBSCHEDULERConnectionString"].ConnectionString;
properties["quartz.dataSource.default.provider"] =
"SqlServer-20";
ISchedulerFactory sf = new
StdSchedulerFactory(properties);
s = sf.GetScheduler();
My ConnectionString: <add name="JOBSCHEDULERConnectionString"
connectionString="Data Source=W074\SQLEXPRESS;Initial
Catalog=JOBSCHEDULER;Integrated Security=True"
providerName="System.Data.SqlClient"/>
But it doesn't work... Error:
Couldn't determine job existence (myGroup.myJob): Couldn't instantiate
delegate: Could not load requested type:
Quartz.Impl.AdoJobStore.MSSQLDelegate, Quartz
What is wrong in my config?
properties["quartz.jobStore.lockHandler.type"] =
"Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz";
Which is a better way. I unfortunately always reflect my advice to
current trunk which may not always be what you see in latest release
documentation or configuration wise.
Cheers,
-Marko
Here is my config:
<quartz>
<add key="quartz.scheduler.instanceName" value="MyScheduler"/>
<add key="quartz.scheduler.instanceId" value="instance_one"/>
<add key="quartz.threadPool.type"
value="Quartz.Simpl.SimpleThreadPool, Quartz"/>
<add key="quartz.threadPool.threadCount" value="10"/>
<add key="quartz.threadPool.threadPriority" value="Normal"/>
<add key="quartz.jobStore.type"
value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz"/>
<add key="quartz.jobStore.misfireThreshold" value="500"/>
<add key="quartz.jobStore.useProperties" value="false"/>
<add key="quartz.jobStore.dataSource" value="default"/>
<add key="quartz.jobStore.tablePrefix" value="QRTZ_"/>
<add key="quartz.jobStore.lockHandler.type"
value="Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz"/>
<add key="quartz.dataSource.default.connectionString" value="Data
Source=W074\SQLEXPRESS;Initial Catalog=QUARTZ;Integrated
Security=True"/>
<add key="quartz.dataSource.default.provider" value="SqlServer-20"/
>
</quartz>
Thanks again!