Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCU-299

Running scheduled jobs on a particular cluster node

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • None
    • None
    • content
    • None

      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. 
      

        Acceptance criteria

              gstockdale Gavan Stockdale
              ahietala Antti Hietala
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: