Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-1046

Valid cron expression not really valid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 1.1.2
    • 1.0.2
    • Triggers
    • None
    • Linux, Standalone Bamboo 1.0.2

      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.

              bmccoy bmccoy
              e13aa53c2c91 Mark Gaylard
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: