The scheduled job are executed in all members of the cluster even if one would have been enough. For example you ends up with one watchlist mail per cluster member.

We need to make sure to run this kind of jobs only once in the whole cluster.

A - Quartz integrated solution

  • pros
    • already done
  • cons
    • more setup

B - XWiki Database based locking system

Pretty much what Quartz is doing but at XWiki level: the idea is to use the database to "lock" jobs ids so that only one member run that job.

  • pros
    • can reuse XWiki database configuration
  • cons
    • need to do it

C - Enable the scheduler on only one cluster member

The idea is to add a disable property in xwiki.cfg to completely disable automated scheduler (probably still allow explicit trigger).

  • pros:
    • very easy
  • cons
    • impossible to deal with jobs that are supposed to run on each member
    • if the "main" node goes down, no scheduler running anymore



Get Connected