Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-52363

"Next Execution" in Scheduled Jobs panel displays timestamps in the past

    XMLWordPrintable

Details

    Description

      The fix for this bug will be backported to our current Long Term Support releases if it passes our risk assessment.

      We recognise the impact of this bug and plan to backport the fix to our Long Term Support releases. Once the exact fix version is known we will update this ticket. Not all code changes are suitable to be backported and this may still be rejected during our review process.

      Problem description

      In Confluence Admin > Scheduled Jobs, the "Next Execution" timestamp can show timestamps in the past under certain conditions.

      It seems that "Next Execution" is calculated when Confluence is started up, OR if the cron expression for the scheduled job is modified, and stores somewhere (likely in-memory). Subsequently, if that job is ran manually, then the "Next Execution" reverts incorrectly to the stored value instead of displaying the next run time. In other words, It appears to be loading a cached value that is no longer valid.

      This appears to be a display problem only, as the job continues to run on schedule despite the backdated "Next Execution" value shown.

      Steps to reproduce

      1. Start Confluence
      2. Navigate to Confluence Admin > Scheduled Jobs
      3. Wait for a few minutes for some scheduled jobs to run. "Flush Task Queue" is a good one to test wiith since it runs every minute.
      4. Click "Run" on the scheduled job to manually run it
      5. After the job runs, click Refresh in web browser

      Expected behavior

      After the scheduled job runs, "Next Execution" is updated to show the next scheduled time to run in the future

      Actual behavior

      "Next execution" reverts back to the original timestamp calculated during startup, which is now outdated. Hence, status is not shown correctly and history not updated.

      Other notes

      • In local testing, if the scheduled job is allowed to run on its own (i.e. not manually triggered) then the "Next Execution" time will be displayed correctly afterwards. However, running the job manually then refreshing the browser afterwards again will re-trigger the bug
      • This is not a problem with local browser cache and can be reproduced even when browser cache is cleared
      • The cached value is also not flushable via the UI at Confluence Admin > Cache Management. However, a restart will clear this

      Attachments

        Issue Links

          Activity

            People

              mleizerovich Maxim Leizerovich
              rchang Robert Chang
              Votes:
              78 Vote for this issue
              Watchers:
              87 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: