Glide
Glide

Reputation: 21275

Does Quartz's @DisallowConcurrentExecution works across multiple JVMs?

If I have my job code deployed on two JVMs with JdbcStore, does @DisallowConcurrentExecution ensure only one job is running across all JVMs?

Upvotes: 2

Views: 1596

Answers (1)

Luca Ghersi
Luca Ghersi

Reputation: 3331

Yes it will; this kind of attributes work even with multiple instances. The only important thing here is that this attributes it's based on the JobKey, not the code as described here.

Anyway, just as reminder, do not run Quartz on multiple server unless you have a deamon to keep your clock in sync. From Quartz guide:

Never run clustering on separate machines, unless their clocks are synchronized using some form of time-sync service (daemon) that runs very regularly (the clocks must be within a second of each other). See http://www.boulder.nist.gov/timefreq/service/its.htm if you are unfamiliar with how to do this.

Upvotes: 3

Related Questions