gpt4 book ai didi

java - quartz集群调度程序中的触发API是否会在同一本地机器或集群中的任何机器上触发作业?

转载 作者:行者123 更新时间:2023-12-01 11:13:56 26 4
gpt4 key购买 nike

当我在集群设置中触发 Quartz 中的作业时,该作业是否仅在同一台机器上或集群设置中的任何机器上触发?

最佳答案

Quartz 文档 Clustering说(强调我的):

Only one node will fire the job for each firing. For example, 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.

基本上,一旦计划运行作业,此信息就会写入数据库。集群中的任何节点都可以从此数据库读取并运行作业。

关于java - quartz集群调度程序中的触发API是否会在同一本地机器或集群中的任何机器上触发作业?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32059482/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com