简体   繁体   中英

Same quartz job running twice because of two server instances

I have this problem: my app has a quartz scheduler to run a task each X minutes. This app is deployed in two server instances, so each instance is executing the task at the same time. I want to execute only one task at the same time.

We have configured Quartz with Spring and our application server is WAS.

Which options do you suggest?

You could setup quartz cluster with JDBC job store - then every job fire will be executed by only one cluster node. You can find more information on that topic in quartz documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM