Scheduled Builds

Build schedules automatically create builds at specified intervals. For example, you can use scheduled builds to run nightly builds, hourly integration tests, or daily ops tasks.

You can create and manage schedules in the Schedules section of your Pipeline Settings.

Screenshot of the Schedules section of Pipeline Settings with an Hourly Security Checks schedule listed

You can also create and manage schedules via the Buildkite GraphQL API.

Schedule intervals

The interval defines when the schedule will create builds. Schedules run in UTC time by default, and can be defined using either predefined intervals or standard crontab time syntax.

Buildkite doesn't support intervals less than 10 minutes.

Predefined intervals

Buildkite supports 6 predefined intervals:

Interval Description Crontab Equivalent
@hourly At the start of every hour 0 * * * *
@daily or @midnight Every day at midnight UTC 0 0 * * *
@weekly Every week at midnight Sunday UTC 0 0 * * 0
@monthly Every month, at midnight UTC on the first day 0 0 1 * *
@yearly Every year, at midnight UTC on the first day 0 0 1 1 *

Crontab time syntax

Intervals can be defined using a variant of the crontab time syntax:

 ┌───────────── minute (0 - 59)
 │ ┌───────────── hour (0 - 23)
 │ │ ┌───────────── day of month (1 - 31)
 │ │ │ ┌───────────── month (1 - 12)
 │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday)
 │ │ │ │ │          ┌─── time zone name or offset (optional)
 │ │ │ │ │          │
 * * * * * Australia/Melbourne

A time zone can optionally be specified as the last segment, either as an IANA Time Zone name like Australia/Melbourne or Europe/Berlin, or as an offset from UTC like +09:00 or -05:00. If no time zone is given, the schedule will run in UTC.

Supported Extensions

Buildkite supports several extensions to the standard POSIX cron syntax.

The / operator

The slash operator allows you to specify step values within ranges. For example, */10 * * * * would run every ten minutes.

L or last token

Using L or last in the day of month field represents the last day. For example, 0 0 L * * represents midnight on the last day of the month, and 0 0 -2-L * * represents the last two days of the month.

Modulo

Using the modulo extension allows you to create schedules for less frequent sets of weekdays. Modulo can only be used in the day of week field.

For example, 0 0 * * 0%3 represents midnight on every third Sunday. You can also use the + operator to offset this. For instance, you can use 0 0 * * 1%2+1 to schedule a build on every odd Monday, whereas 0 0 * * 0%2 would run every even Monday.

Examples

*/10 * * * * Every 10 minutes
*/30 * * * * Every 30 minutes
30 * * * * Every 30th minute of every hour
0 */4 * * * Every 4 hours
0 */12 * * * Every 12 hours
0 0 */2 * * +01:00 Every other day at midnight UTC+1
0 8 * * * Every day at 8am UTC
0 8 * * * America/Vancouver Every day at 8am in Vancouver
0 16 * * SUN Every Sunday at 4pm UTC
0 0 * * 1-5 Every weekday at midnight UTC
0 0 L * * Midnight UTC on the last day of the month
0 0 1 */2 * Every other month, at midnight UTC on the first day
0 16 L * * The last day of the month at 4pm UTC
0 0 * * 2%2+1 The start of every odd Tuesday