Scheduled Jobs
The administration console allows you to schedule various administrative jobs in Confluence, so that they are executed at regular time intervals. The types of jobs which can be scheduled cover:
- Confluence site backups
- Storage optimisation jobs to clear Confluence's temporary files and caches
- Index optimisation jobs to ensure Confluence's search index is up to date
- Mail queue optimisation jobs to ensure Confluence's mail queue is maintained and notifications have been sent.
You'll need System Administrator permissions in order to edit and manually run jobs.
Accessing Confluence's Scheduled Jobs Configuration
To access Confluence's Scheduled Jobs configuration page:
- > General Configuration > Scheduled Jobs
- All scheduled jobs are listed with:
- Status - the job's status, which is either 'Scheduled' (it it is currently enabled) or 'Disabled'.
- Last Execution - the date and time when the job was last executed. This field will be empty of the job was never executed.
- Next Execution -the date and time when the job is next scheduled to be executed. This field will contain dash symbol ('-') if the job is disabled.
- Avg. Duration - the length of time (in milliseconds) that it took to complete the job (the last time it ran).
- Actions - Options to edit the job's schedule, run it manually, view the history or disable the job.
Screenshot: Scheduled Jobs
Running a job manually
To run a job manually head to the Scheduled Jobs list and choose Run next to the job. It will run immediately.
Not all jobs can be run manually.
Changing a job's schedule
To change a job's schedule:
- Choose Edit next to the job you want to change.
- Enter the new day or time to run the job as a cron expression - there's more info about cron expressions below.
- Save your changes to the job's schedule, or Revert back to the default setting.
Not all jobs' schedules are configurable.
Screenshot: Configuring a Job Schedule
Disabling/Re-enabling a Job
By default, all jobs in Confluence are enabled.
Use the Disable / Enable links in the action column to disable and re-enable each job.
Not all jobs in Confluence can be disabled.
Viewing a Job's Execution History
To see when a job was last run, and how long the job took to run, click the History link beside the job.
If a job has not run at least once the History link won't appear.
Screenshot: Job Execution History
Types of Jobs
Job Name | Description | Execution Behaviour | Default Schedule |
---|---|---|---|
Back Up Confluence | Performs a backup of your entire Confluence site. | Per cluster | At 2am every day |
Check Cluster Safety | For clustered Confluence installations, this job ensures that only one Confluence instance in the cluster writes to the database at a time. | Per cluster | Every 30 seconds |
Clean Journal Entries | Periodically clears journal entries that have already been processed to ensure that its size does not grow indefinitely. | Per node | At 2am every day |
Clean Temporary Directory | Cleans up temporary files generated in the | Per node | At 4am every day |
Clear Expired Mail Errors | Clears notification errors in the mail error queue. A notification error is sent to the mail error queue whenever the notification fails to be sent due to an error. | Per cluster | At 3am every day |
Clear Expired Remember Me Tokens | Clears all expired 'Remember Me' tokens from the Confluence site. Remember Me tokens expire after two weeks. | Per cluster | On the 20th of each month |
Email Daily Reports | Emails a daily summary report of all Confluence changes to all subscribers. | Per cluster | At 12am every day |
Flush Edge Index Queue | Flushes the Edge Index Queue so Confluence's search results stay up to date. | Per node | Every 30 seconds |
Flush Index Queue | Flushes changes to Confluence's index so that Confluence's search results are up to date. Confluence records each content update in its search index. | Per node | Every 5 seconds |
Flush Local Task Queue | Flushes the local task queue. (These are internal Confluence tasks that are typically flushed at a high frequency.) | Per node | Every minute |
Flush Mail Queue | Sends notifications that have been queued up in the mail queue. | Per cluster | Every minute |
Flush Task Queue | Flushes the task queue. (These are internal Confluence tasks that are typically flushed at a high frequency.) | Per node | Every minute |
Send Recommended Updates Email | Triggers sending recommended update emails to users. The job runs hourly, but users will receive the notification weekly or daily, depending on the setting in their profile, at a time that matches their timezone. | Per cluster | Hourly |
Cron Expressions
A cron expression is a string of 6-7 'time interval' fields that defines the frequency with which a job is executed. Each of these fields can be expressed as either a numerical value or a special character and each field is separated by at least one space or tab character.
The table below is shows the order of time interval fields in a cron expression and each field's permitted numerical values.
You can specify a special character instead of a numerical value for any field in the cron expression to provide flexibility in defining a job's frequency. Common special characters include:
- '*' — a 'wild card' that indicates 'all permitted values'.
- '?' — indicates 'ignore this time interval' in the cron expression. That is, the cron expression will not be bound by the time interval (such as 'Month', 'Day of week' or 'Year') to which this character is specified.
For more information about cron expressions, please refer to the Cron Trigger tutorial on the Quartz website.
Order in cron | Time interval | Permitted | Required? |
---|---|---|---|
1 | Seconds | 0-59 | Yes |
2 | Minutes | 0-59 | Yes |
3 | Hours | 0-23 | Yes |
4 | Day of month | 1-31 | Yes |
5 | Month | 1-12 or JAN-DEC | Yes |
6 | Day of week | 1-7 or SUN-SAT | Yes |
7 | Year | 1970-2099 | No |
* Excluding special characters.