Job Config Module
Job Config module defines an atlassian-scheduler
JobConfig within a plugin. Atlassian Scheduler is used for creating scheduled tasks in Atlassian applications.
- For more information about plugins in general, read Confluence Plugin Guide.
- To learn how to install and configure plugins (including macros), read Installing an add-on.
- For an introduction to writing your own plugins, read Writing Confluence Plugins
Job Config Module
Defines an atlassian-scheduler
JobConfig within a plugin. Here's an example:
Job runner classes must implement
- the name represents how this job config will be referred to in the Confluence interface.
- the key represents the internal, system name for the job.
- the key points to the
- when perClusterJob is true, this job will only run once in a cluster rather than on every node.
- when clusteredOnly is true this job won't be scheduled in non-clustered environment. This is optional.
either a cron-expression or repeat-interval must be present.
- repeat-interval allows you to use an interval, instead of a cron-expression.
This example repeats every hour (3600000 milliseconds) and only 5 times:
- repeat-count is optional when repeat-interval is used.
- to repeat indefinitely, set repeat-count to
-1or omit it
- to run the job only once set repeat-count to
- jitterSecs (optional) introduces some random jitter. This is only for Confluence Cloud. It prevents many thousands of servers from attempting to do similar things all at once, by providing a jitter value less than the size of the schedule frequency, we spread the load caused by a process over time.
- managed is optional. If this is omitted the job won't appear in the Scheduled Jobs administration page in Confluence.
- If any of the following attributes are omitted, their values are assumed to be
- when true, editable allows the job's schedule can be edited. This is forced to false if schedule type is interval.
- when true, keepingHistory means the job's history persists and survives server restarts. If false the job's history is only stored in memory and will be lost on the next server restart.
- when true, canRunAdhoc allows the job to be executed manually on the Scheduled Jobs administration screen.
- when true, canDisable allows the job to be enabled or disabled on the Scheduled Jobs administration screen.
- For ease of use (see CONF-20162), there's nothing to replace
<component>as above instead.
- The XML of
<job-config>is similar to
<trigger>to make the migration easier.
- For managed jobs, the
<job-config>is used to lookup the i18n job name (
scheduledjob.desc.<key>), and display it in the Confluence admin UI. Previously it was the