Search code examples
jakarta-eequartz-scheduler

Is this achievable with Quartz scheduler?


If I have a JEE application on 3 nodes and need the quartz scheduled job to run on only one node at any given time.
Is this achievable? How?
Other options?


Solution

  • Yes. Simply enable Quartz in clustered mode on all three nodes. Each time your Job is triggered, one of those nodes will be selected to run the job.

    There's a little bit of initial setup work to do, and you do need a database, but it's pretty manageable: http://www.quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigJDBCJobStoreClustering.html