多个应用服务器中的相同 Quartz.Net 调度程序. [英] Same Quartz.Net scheduler in multiple app server.

查看:44
本文介绍了多个应用服务器中的相同 Quartz.Net 调度程序.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Quartz.NET (v.3.0.3) 中的新成员.我有控制台应用程序,它是石英主机和广播 tcp.x:555/QuartzScheduler.

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.

在我的公司,我们有 2 台应用服务器机器,它们自己是主从.如果主应用关闭,则由它代替.我们将在这些服务器中设置控制台应用程序(即服务).

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.

如果我们这样做,在 Quartz.NET 中会发生什么,这些调度程序是相同的还是不同的?

If we do that what happens in Quartz.NET , is these schedulers will be same or different ?

PS:我们使用的是 MsSQL jobStore (AdoNetJobStore).

PS: we're using MsSQL jobStore (AdoNetJobStore).

感谢您的回复.

推荐答案

我在这个页面找到了我自己的解决方案;

I found my own solution in this page ;

Quartz.NET 集群

我复制我的控制台应用程序并更改端口地址(1:localhost:555 端口,2:localhost:556 端口),创建六个作业,其中三个在 30 秒内运行,其他在 60 秒内运行.我们以相同的方式运行它们时间和石英做什么;

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 ;

运行相同的 PC 控制台应用

和我的财产;

<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>

谢谢!

这篇关于多个应用服务器中的相同 Quartz.Net 调度程序.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆