Announcement Announcement Module
Collapse
No announcement yet.
Clustered cron jobs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clustered cron jobs

    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.

  • #2
    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.

    Comment


    • #3
      Originally posted by libor.subcik View Post
      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.

      Comment


      • #4
        Originally posted by Lewisser
        hey thanks libor.subcik for sharing this information , i have also faced this problem but know it is solved because of you . it is really helpful.

        Hello Lewisser,

        Could you solve the problem quartz in different machines?
        Can you help with this probem.

        Thanks for your attention.

        Comment

        Working...
        X