How to reset Jira Data Center scheduled jobs using SQL

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptoms

  • Users not getting subscription emails

  • User directories not syncing automatically

  • Last-run date for services is listed as some date in the future

  • Log files may have a future-dated timestamp in the filesystem

Environment

9.0.0

Diagnosis

Check the database with the following query to see what the next-run date is for various services:

1 SELECT * FROM clusteredjob;

The entries will report a value in epoch time, eg. 1681418572 (which, in this example, indicates a date April 13 2023 20:42:52). If the entries are future-dated for a point far into the future, then you're encountering this issue.

Cause

An issue with the server time being improperly changed for a date in the future

Solution

  1. Stop Jira

  2. Back up your DB

  3. Run the following query, where <EPOCH_DATE> is set to the date/time you'd like the services to run next:

    1 UPDATE CLUSTEREDJOB SET NEXT_RUN = <EPOCH_DATE>;

    This will set all jobs in the CLUSTEREDJOB table to run at the same time. If your instance has a large number of scheduled jobs, this can cause a temporary performance impact as all the jobs will fire off at once.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.