When specifying a cron trigger, I used
0 0 20 * * MON-THU
It appeared to save ok, but when it didn't run the build I checked the bamboo.log file and found
2007-03-20 09:56:22,576 ERROR [SocketListener0-7] [CronTriggerBuildStrategy] java.lang.UnsupportedOperationException: Support for specifying both a day-of-week AND a day-of-month parameter is not implemented.
java.lang.UnsupportedOperationException: Support for specifying both a day-of-week AND a day-of-month parameter is not implemented.
at org.quartz.CronExpression.getTimeAfter(CronExpression.java:1234)
at org.quartz.CronTrigger.getTimeAfter(CronTrigger.java:857)
at org.quartz.CronTrigger.getFireTimeAfter(CronTrigger.java:587)
at org.quartz.CronTrigger.computeFirstFireTime(CronTrigger.java:836)
at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:606)
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:238)
at com.atlassian.bamboo.build.strategy.CronTriggerBuildStrategy.initialiseJob(CronTriggerBuildStrategy.java:100)
at com.atlassian.bamboo.build.HibernateBuildManager.createSchedulingJobs(HibernateBuildManager.java:384)
at com.atlassian.bamboo.build.HibernateBuildManager.saveBuildConfig(HibernateBuildManager.java:205)
<snip>
Changing the cron expression to
0 0 20 ? * MON-THU
worked ok. The first style is a valid cron expression (it came out of an existing crontab file). If it isn't valid for quartz, an error message should be shown.
Thanks for pointing this out. I have added extra validation to catch out these errors when you are configuring the build rather than later down the track. The changes will be included in the next release.
Cheers,
Brydie