[DOCU-299] Running scheduled jobs on a particular cluster node Created: 23/Jul/12  Updated: 04/Oct/12  Resolved: 24/Jul/12

Status: Closed
Project: Documentation
Component/s: content
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Neutral
Reporter: Antti Hietala Assignee: Gavan Stockdale
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLSCH-15 Allow tasks to specify cluster node o... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

You can target scheduled jobs (tasks) to run on a particular cluster node. This avoids lockups occurring when two or more jobs try to access the same content. This feature has been available since Scheduler 1.4.4. Document the feature in the Scheduler module.

  • The cluster node must be identified by setting a magnolia.clusterid property in its magnolia.properties file. The value can be a literal cluster name such as public123 or a variable such as ${servername}
  • In order to run a job on that cluster node, the job configuration must have a corresponding clusterId property. The value must match the value of magnolia.clusterId. This means that if you want to run the job on a particular cluster node, configure the property and set its value in the job.
  • The clusterId property should go under the params content node, see example below.
  • If a job configuration does not have a clusterId property, the job will run on all cluster nodes. This is a fallback mechanism that saves some effort when you have many cluster nodes. Suppose you need to change a job configuration and your config workspace is not clustered. You would have to change it on every cluster node separately. With the fallback you change it in one node and leave the clusterId property out. The job will now run on all cluster nodes.
  • Draw a diagram if it helps.

Example: Setting a cluster ID in magnolia.properties file.

magnolia.clusterId=public123

Example: Setting a cluster ID in the job configuration.

+ modules
  + scheduler
    + config
      + jobs
        + ImportRSSFeeds
          + params
            - clusterId = public123
            - importer = rssaggregator
          - active = true
          - active = true
          - catalog = data
          - command = import
          - cron = 0 0 6 * * *
          - description = Update feeds every day at 6 a.m. 


 Comments   
Comment by Jan Haderka [ 08/Aug/12 ]

Was this ever activated? I don't see anything mentioning cluster id in scheduler documentation.

Comment by Antti Hietala [ 08/Aug/12 ]

Activated. http://documentation.magnolia-cms.com/modules/scheduler.html#Schedulingtasksonclusternodes

Generated at Mon Feb 12 01:07:49 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.