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.

(info) You need to have System Administrator permissions in order to configure and execute jobs.

Accessing Confluence's Scheduled Jobs Configuration

To access Confluence's Scheduled Jobs configuration page:

  1. Choose the cog icon , then choose General Configuration under Confluence Administration.
  2. Choose 'Scheduled Jobs' to open the 'Scheduled Jobs' page. For each job listed down this page, the following information is shown:
    • Job — the name of a job.
    • Status — the job's status, which is either 'Scheduled' (it it is currently enabled) or 'Disabled'. See below for details on disabling or re-enabling a job.
    • 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's last execution.
    • Actions — allows you to configure the job, execute it manually, view a history of previous executions or disable the job.

On this page:

Related pages:

(warning) The information on this page does not apply to Confluence Cloud.

Screenshot: Scheduled Jobs

Executing a Job Manually

  1. Access the 'Scheduled Jobs' configuration page (above).
  2. Locate the job you wish to execute manually and click its 'Run' link in the 'Actions' column. The job will be run immediately.
    (tick) Refer to 'Types of Jobs' (below) for detailed descriptions about each job.

    (info) Not all jobs can be run manually.

Configuring a Job's Schedule

  1. Access the 'Scheduled Jobs' configuration page (above).
  2. Locate the job whose schedule you wish to configure and click its 'Edit' link in the 'Actions' column. The job's 'Edit Schedule for job' dialog box opens.
    (tick) Refer to 'Types of Jobs' (below) for detailed descriptions about each job.
  3. Enter an appropriate cron expression to define the frequency with which the job is executed.
    (tick) Refer to 'Cron Expressions' (below) for more details about their syntax. To revert the job's schedule back to its default settings, click the 'Default' button.
  4. Click 'Save' to record your job's new schedule.

    (info) Not all jobs' schedules are configurable.

Screenshot: Configuring a Job Schedule

Disabling/Re-enabling a Job

By default, all jobs in Confluence are enabled.

  1. Access the 'Scheduled Jobs' configuration page (above).
  2. Locate the job you wish to disable/re-enable.
    (tick) Refer to 'Types of Jobs' (below) for detailed descriptions about each job.
    • If a job is enabled, click its 'Disable' link in the 'Actions' column to disable the job.
    • If a job is disabled, click its 'Enable' link in the 'Actions' column to enable the job.

      (info) Not all jobs in Confluence can be disabled.

Viewing a Job's Execution History

  1. Access the 'Scheduled Jobs' configuration page (above).
  2. Locate the job whose execution history you wish to view and click the 'History' link.
    (info) If a job has not completed at least one execution, its 'History' link will not be available.
    (tick) Refer to 'Types of Jobs' (below) for detailed descriptions about each job.
    The 'History for job' dialog box opens, showing a list of previous executions of the job in reverse chronological order, including the:
    • Start date and time
    • End date and time
    • The length of time (in milliseconds) that it took to complete the job

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.
For standard (non-clustered) editions of Confluence, this job is useful for alerting customers who have accidentally connected a second Confluence instance to a Confluence database which is already in use.

Per cluster

Every 30 seconds

Clean Index Queue

Triggers a periodical clean of the index queue to ensure that its size does NOT grow indefinitely.

Per cluster

At 2am every day

Clean Temporary Directory

Cleans up temporary files generated in the 'temp' subdirectory of the Confluence home directory. This temp directory may be created by exports etc.
(info) This does not include the temp directory located in the confluence install directory. 

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.
(info) Since each email report only records changes from the last 24-hour period, it is recommended that you only change the time of this job whilst keeping the job's frequency to 24 hours.

Per cluster

At 12am every day

Flush Did You Mean Index

Note: The 'Did You Mean' feature is no longer available in Confluence. This job is therefore redundant, and will be removed at some time in the future.

Flushes changes to the 'Did You Mean' index, which keeps the 'Did You Mean' feature up to date. Confluence records each content update in the 'Did You Mean' index.

Per node

Every 2 hours from 12 am

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 minute

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

Optimise Indexing

Compacts the confluence indexes to maintain searching performance.
(tick) This task is demanding on system resources and does not need to be performed too regularly. If you see Confluence performance deteriorate around 3pm, try scheduling this job for 3am only and check if search performance remains reasonable.

Per node

At 3am and 3pm every day

Poll Mail

Polls POP accounts on all spaces that have them configured.

Per cluster

Every minute

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
expression

Time interval
field

Permitted
values*

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.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport