Skip to content

Schedules

Schedules

Every job with a cron trigger, in one table: the expression, the next fire time, the last fire time and a switch.

The scheduler runs once a minute, on one node — in a clustered deployment whichever node currently holds the scheduler lease, so a cron expression fires once for the cluster rather than once per node.

Each pass compares due expressions, reports the local runner's heartbeat, marks runners that have gone quiet as offline, and sweeps builds past the retention window. A schedule of * * * * * therefore fires every minute; anything finer is not expressible.

Expressions

Five fields — minute, hour, day of month, month, day of week — evaluated in the time zone set in Settings → General, not UTC and not the browser's zone.

ExpressionFires
*/15 * * * *Every 15 minutes
30 2 * * *Daily at 02:30
0 18 * * 5Fridays at 18:00
0 0 1 * *The 1st of each month, 00:00

Next 24 hours lists what will actually fire, expanded, which is the quickest way to check that an expression means what you think it means before you leave for the weekend.

Interaction with other triggers

A schedule is one of three triggers and does not exclude the others — a job can be scheduled nightly and still be run by hand or by a push. Pausing a job stops the schedule too; the row stays in the table with its switch off.

A scheduled build for a runner that is offline is still created. It waits in the queue until the runner comes back, rather than being dropped.

Released under the MIT License.