Results 1 to 4 of 4

Thread: Clustered cron jobs

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Posts
    8

    Default 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. #2
    Join Date
    Sep 2012
    Location
    Czech Republic
    Posts
    39

    Default

    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.

  3. #3
    Join Date
    Oct 2010
    Posts
    8

    Default

    Quote 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.

  4. #4
    Join Date
    Oct 2010
    Posts
    8

    Default

    Quote Originally Posted by Lewisser View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •