集群环境中的 Quartz 调度程序作业发布

Quartz scheduler job issuing in clustered environment

我有一个集群,有两个节点,连接到同一个数据库,还有一个计划作业,由 Quartz 调度程序每 10 分钟启动一次。在 quartz.properties org.quartz.jobStore.isClustered=true 中设置。

我感兴趣的是调度程序是否会为同一节点发出作业,直到它每 10 分钟可达一次,或者它使用某种算法来确定哪个节点将执行作业。

我在文档中没有找到任何相关信息 (http://www.quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigJDBCJobStoreClustering.html)。

谢谢。

我在 quartz 教程中找到了这个:

Only one node will fire the job for each firing. What I mean by that is, if the job has a repeating trigger that tells it to fire every 10 seconds, then at 12:00:00 exactly one node will run the job, and at 12:00:10 exactly one node will run the job, etc. It won’t necessarily be the same node each time - it will more or less be random which node runs it. The load balancing mechanism is near-random for busy schedulers (lots of triggers) but favors the same node that just was just active for non-busy (e.g. one or two triggers) schedulers.

http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-11.html