Same Quartz.Net scheduler in multiple app server.

前端 未结 1 507
太阳男子
太阳男子 2021-01-28 14:20

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 w

相关标签:
1条回答
  • 2021-01-28 15:01

    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 !

    0 讨论(0)
提交回复
热议问题