问题
im the new in Quartz.NET (v.3.0.3).I have console application and it's quartz host and broadcasting tcp.x:555/QuartzScheduler.
In my company we have 2 app server machines and they're master-slave themselves.If master app is down slave take it's place.We will setup console application ( as a service ) in these servers.
If we do that what happens in Quartz.NET , is these schedulers will be same or different ?
PS: we're using MsSQL jobStore (AdoNetJobStore).
Thank you for reply.
回答1:
I found my own solution in this page ;
Quartz.NET Clustering
I duplicate my console app and change port address (1 : localhost:555 port , 2 : localhost:556 port ) , create six jobs three of them run in 30 sec , others run in 60 sec.we run them in same time and here what quartz do ;
running same PC Console App
and my properies ;
<quartz>
<add key="quartz.scheduler.instanceName" value="RemoteServer"></add>
<add key="quartz.scheduler.instanceId" value="AUTO"></add>
<add key="quartz.jobStore.clustered" value="true"></add>
<add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz"></add>
<add key="quartz.threadPool.threadCount" value="5"></add>
<add key="quartz.threadPool.threadPriority" value="Normal"></add>
<!-- Tcp Hosting-->
<add key="quartz.scheduler.exporter.type" value="Quartz.Simpl.RemotingSchedulerExporter, Quartz"></add>
<add key="quartz.scheduler.exporter.port" value="556"></add>
<add key="quartz.scheduler.exporter.bindName" value="QuartzScheduler"></add>
<add key="quartz.scheduler.exporter.channelType" value="tcp"></add>
<add key="quartz.scheduler.exporter.channelName" value="httpQuartz"></add>
<!-- DB-->
<add key="quartz.jobStore.type" value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz"></add>
<add key="quartz.jobStore.useProperties" value="true"></add>
<add key="quartz.jobStore.dataSource" value="myDS"></add>
<add key="quartz.jobStore.tablePrefix" value="[dbo].QRTZ_"></add>
<add key="quartz.jobStore.driverDelegateType" value="Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz"></add>
<add key="quartz.dataSource.myDS.connectionString" value="Data Source=xxx;Initial Catalog=xxx;User ID=xxx;Password=xxx"></add>
<add key="quartz.dataSource.myDS.provider" value="SqlServer"></add>
<add key="quartz.serializer.type" value="binary"></add>
Thank you !
来源:https://stackoverflow.com/questions/49175092/same-quartz-net-scheduler-in-multiple-app-server