在集群环境中使用Quartz [英] Using Quartz in a clustered environment

查看:116
本文介绍了在集群环境中使用Quartz的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在我的应用程序中使用quartz调度程序,因为我有一个集群环境,并希望保证每小时只运行一个作业实例。我的问题是......我是否必须使用JDBC作业存储或作业数据的某种外部存储来保证我的集群中只有一个实例在任何给定的时间运行该作业,或者对Quartz来说是否有更多魔力我知道吗?

I'm looking to use the quartz scheduler in my application because I have a clustered environment and want to guarantee that only one instance of my job runs each hour. My question is...Do I have to use a JDBC job store or some sort of "outside" storage of job data to guarantee that only once instance in my cluster runs the job at any given hour or is there more magic to Quartz that I am aware of?

推荐答案

是的,您需要使用JDBC-JobStore,或者TerracottaJobStore来启用机制节点彼此通信(在一种情况下,它们在数据库表中进行通信,在另一种情况下通过Terracotta网络功能进行通信)。

Yes, you need to use the JDBC-JobStore, or else the TerracottaJobStore to enable a mechanism for the nodes to communicate with each other (in the one case they communicate in the db tables, in the other via the Terracotta networking features).

这篇关于在集群环境中使用Quartz的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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