Our (Spring) application contains several Schedulers which become active during the night to change/update some data (from Database) in Batch.
This is all running fine, the problem is that our application will soon run in a clustered environment.
What are the best options to prevent a scheduler of instance A and instance B are doing the same work at the same time?
** UPDATE **
Clustered environment is setup as 'active-active'.
Each node communicates with it's own database instance. Each database instance will replicate data to the other instances.
DB-instances are not setup as 'master-slave' but will run in a Galera cluster where each instance executes insert-update-delete operations.
So each scheduler should run only once on one instance. The other instances should not run the schedulers. So I need to find a way the a Scheduler of one instance runs, the same schedulers of the other instances should not run.