Have a spring Boot application through which i am able to create a cron and schedule the tasks . However when the multiple instances of the app are deployed , the cron gets triggered in all the instances and results in duplication. Is there any configuration which needs to be done in spring level?
We are using redis and using a flag this can be controlled in other instances but need a better approach for resolving this issue. Tried even the redisson library which didnt help much.
Need to even consider the failover cases whenever a instance is down.Please help.
Thanks