Constructing a cron expression in Bamboo
Cron is a time-based job scheduler used in Unix/Linux computer operating systems with a unique and powerful terminology. A number of scheduling features in Bamboo, such as build expiry and elastic instance scheduling, require you to specify your requirements as a cron-based expression. For example, a cron expression such as "0 0/30 9-19 ? * MON-FRI" signifies that a scheduled event will be triggered every half an hour from 9am to 7pm, Monday to Friday.
A cron expression comprises of 6 mandatory and one optional field to specify a schedule. The fields in sequential order are: seconds, minutes, hours, day-of-month, month, day-of-week and (optional) year, i.e.
<seconds> <minutes> <hours> <day-of-month> <month> <day-of-week> <year (optional)>
Each field can be expressed as an integer (e.g.
1,2,3, etc) and special characters can be used in most fields as well (i.e. '
, - * / ? L W #').
Bamboo uses OpenSymphony's Quartz to schedule cron tasks. The syntax it accepts may vary from other cron implementations. Please refer to the Quartz CronTrigger Tutorial documentation for further information on each of these parameters and more detailed examples.