-
Bug
-
Resolution: Fixed
-
Highest
-
6.8.2, 6.13.9, 7.4.4, 7.7.4
-
14
-
Severity 2 - Major
-
7
-
Bug Summary:
Scheduled jobs settings are reverted back after Confluence restart
Bug description
Test case: user wants to adjust "Send Batched Notifications" execution schedule from default value (every 10 minutes) to once per day at any given hour.
Send Batched Notifications scheduled job/cron setting can be adjusted by opening Confluence Administration -> Scheduled Jobs -> Send Batched notifications (sample scheduled job) -> Edit.
Then adjust Cron Expression to "0 0 16 * * ?" (At 16:00:00 every day) from default "0 0/10 * 1/1 * ? *"
Next Send Batched Notifications will be executed at 16:00 but after Confluence restart old 10 minutes interval is used.
Steps to replicate
- Setup clean Confluence instance
- Verify in application that scheduledjob "Send Batched Notifications" uses default value for "Send Batched Notifications":
Confluence Administration -> Scheduled Jobs -> Send Batched notifications -> Edit
verify Send Batched Notifications settings in the databaseselect * from BANDANA where BANDANAKEY = 'DEFAULT#batchingJobConfig': # output 68;"com.atlassian.confluence.schedule.ScheduledJobConfiguration";"DEFAULT#batchingJobConfig";"<com.atlassian.confluence.schedule.ScheduledJobConfiguration> <enabled> <value>1</value> </enabled> <cronSchedule/> <repeatInterval/> </com.atlassian.confluence.schedule.ScheduledJobConfiguration>"
- Go to Confluence Administration -> Scheduled Jobs -> Send Batched notifications -> Edit
change cron expression to "0 0 16 * * ?" , click on save
verify in the databaseselect * from BANDANA where BANDANAKEY = 'DEFAULT#batchingJobConfig' # output 68;"com.atlassian.confluence.schedule.ScheduledJobConfiguration";"DEFAULT#batchingJobConfig";"<com.atlassian.confluence.schedule.ScheduledJobConfiguration> <enabled> <value>1</value> </enabled> <cronSchedule> <value class="string">0 0 16 * * ?</value> </cronSchedule> <repeatInterval/> </com.atlassian.confluence.schedule.ScheduledJ (...)"
- Wait for the next scheduled execution specified in custom cron expression
- Wait ~1hr (to see if scheduled jobs are not executed in old 10 minutes interval)
- Restart Confluence
Expected results
After Confluence restart "Send Batched notifications" is executed according to custom cron expression (16:00:00 every day)
Actual results
- database contains adjusted rows corresponding to cron job:
6. select * from BANDANA where BANDANAKEY = 'DEFAULT#batchingJobConfig' 68;"com.atlassian.confluence.schedule.ScheduledJobConfiguration";"DEFAULT#batchingJobConfig";"<com.atlassian.confluence.schedule.ScheduledJobConfiguration> <enabled> <value>1</value> </enabled> <cronSchedule> <value class="string">0 0 16 * * ?</value> </cronSchedule> <repeatInterval/> </com.atlassian.confluence.schedule.ScheduledJ (...)"
Workaround
Edit again the scheduled job and simply click on Save and the job will again be executed according to the entered cron expression.
This will be need to be done every time Confluence is restarted for all scheduled jobs that have been edited.
Notes
This also affects custom Caesium based jobs created by 3rd party apps, such as Better Content Archiving for Confluence and Gliffy Diagrams for Confluence.
However not all built-in jobs are affected, for example it does not affect the job Clean Old Audit Records.