Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
Description
Scheduled Report with older cron job will generate an exception.
Steps to reproduce the error:
- Create a new scheduled report with the following cron expression: '* 0,20 0,17 21 MAR ? 2019' (you may need to add this value manually on DB)
- Enable the scheduled report.
Exception:
2019-10-17 11:54:31,990 http-nio-8080-exec-12 ERROR admin 714x51142x1 x9ctpe 0:0:0:0:0:0:0:1 /rest/jiraxporter/1.0/scheduledreports/enable/1/true [c.x.jiraxporter.component.ScheduledReportsManager] Error scheduling Scheduled Report: com.atlassian.scheduler.SchedulerServiceException: Job 'com.xpandit.jiraxporter.component.ScheduledReportsManager:1' would never run: Schedule[type=CRON_EXPRESSION,cronScheduleInfo=CronScheduleInfo[cronExpression='* 0,20 0,17 21 MAR ? 2019',timeZone=null]] at com.atlassian.scheduler.caesium.impl.RunTimeCalculator.firstRunTime(RunTimeCalculator.java:49) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.scheduleClusteredJob(CaesiumSchedulerService.java:178) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.scheduleJob(CaesiumSchedulerService.java:136) at com.atlassian.scheduler.core.DelegatingSchedulerService.scheduleJob(DelegatingSchedulerService.java:62) at sun.reflect.GeneratedMethodAccessor229.invoke(Unknown Source)
Solution:
We should update the Cron expression on DB with the message: " cron expression would never run" and disable the Scheduled Report.
Finally, the user must be notified, on JIRA, about this error and a message to update for a valid cron expression.