Hi all,
I am using spring TaskExecutor and TaskScheduler .
I need high availability so i have a cluster from my web cron job project.
But each node in the cluster fire the cron job.
How can i do to only one node in the cluster fire the job ?
Thanks.
Hi all,
I am using spring TaskExecutor and TaskScheduler .
I need high availability so i have a cluster from my web cron job project.
But each node in the cluster fire the cron job.
How can i do to only one node in the cluster fire the job ?
Thanks.
Use Quartz with a database store - it is indended to use in a cluster environment. Spring has support for Quartz.
I think Spring build-in task api (task namespace etc.) does not have support for clusters. You can run scheduled tasks on one node only, but the node can go down and you lost high availability.
Hi,
Thank you very much for the advice.
I'm reading about Quartz. Quartz supports clustered Quartz cron jobs (http://quartz-scheduler.org/document...toreClustering).
However, quartz has "issues" if i deploy my project on different machines.
"Never run clustering on separate machines, clocks are synchronized Their UNLESS using some form of time-sync service (daemon) runs very Regularly That (the clocks must be Within a second of each other)."
The project requeire H.A. therefore it will be deployed in different county datacenters, so it is not possible to synchronize the clocks of the machines.
I'm still researching to see if I can give a solution.
Thank you very much.