Confluence 2.2 to Confluence 5.9
In Confluence 3.5 and later, the
|Status:||Deprecated in Confluence 5.10 - use Job Config instead|
Trigger plugin modules enable you to schedule when your Job Module are scheduled to run Confluence.
- For more information about plugins in general, read Confluence Plugin Guide.
- To learn how to install and configure plugins (including macros), read Installing a Plugin.
- For an introduction to writing your own plugins, read Writing Confluence Plugins
Trigger Plugin Module
The Trigger plugin module schedules Jobs within a plugin. Triggers are one of two types:
- cron - jobs are scheduled using cron syntax
- simple - jobs are scheduled to repeat every X seconds
Here is an example
atlassian-plugin.xml fragment containing a Job with it's corresponding Trigger module using a cron-style expression (for reference, this expression will execute the job with key 'myJob' every minute):
trigger element accepts the following attributes:
name— represents how this component will be referred to in the Confluence interface.
key— represents the internal, system name for your Trigger.
trigger element also accepts the following elements:
schedule— defines a cron expression in its
cron-expressionattribute. For more information on cron expressions can be found on the Scheduled Jobs page (or the Cron Trigger tutorial on the Quartz website).
managed(Available in Confluence 3.5 and later only) — an optional element that defines the configuration of the job on the Scheduled Jobs administration page. If the managed element is omitted, then the job will not appear in the Scheduled Jobs administration page. This element takes the following attributes each of which take the values of either
If any of these attributes are omitted, their values are assumed to be
true, the job's schedule can be edited.
true, the job's history persists and survives server restarts. If
false, the job's history is only stored in memory and will be lost upon the next server restart.
true, the job can be executed manually on the Scheduled Jobs administration screen.
true, the job can be enabled/disabled on the Scheduled Jobs administration screen.
Here is another example, this time using a simple trigger that repeats every 3600000 milliseconds (1 hour) and will only repeat 5 times: