Schedules
A schedule creates a task on a cron schedule: a nightly dependency bump, a weekly report, an hourly check. Each time it fires it creates a new task from its template, the same as one you create by hand, and the task starts at once.
Schedules belong to the organisation, not to the member who created them. They are on the Schedules page of the Web UI.
Creating a schedule
Section titled “Creating a schedule”Schedules → + Schedule asks for:
- Name: the name of every task it creates. Optional.
- Runner and Workspace for its tasks.
- Instructions: the instruction every task starts with.
- Cron expression: when to fire. See below.
- Timezone: the timezone the cron expression is read in. Defaults to your browser’s.
- Namespace: the namespace of its tasks. Optional.
- Auto-archive: its tasks’ auto-archive delay. Scheduled tasks often have no one watching them, so a short delay keeps them from piling up.
- Enabled: a disabled schedule is saved but doesn’t fire.
Cron expressions
Section titled “Cron expressions”A schedule takes a standard five-field cron expression: minute, hour, day of
month, month, day of week. There is no seconds field. These shorthands work too:
@yearly, @monthly, @weekly, @daily and @hourly.
| Expression | Fires |
|---|---|
0 9 * * * |
Every day at 09:00 |
30 6 * * 1-5 |
Weekdays at 06:30 |
0 */4 * * * |
Every four hours, on the hour |
@weekly |
Sundays at midnight |
The expression is evaluated in the schedule’s timezone, so 0 9 * * * in
Europe/Paris fires at 09:00 Paris time on both sides of a daylight saving
change. An expression or timezone gritz can’t parse is rejected when you save.
Times are minute-precise: a schedule fires within a few seconds of the minute it is due. If the server is down when a schedule is due, it fires once when the server is back, however many times it was due in between, and then carries on from the next due time.
Each run is a new task
Section titled “Each run is a new task”Every time a schedule fires it creates a new task. It doesn’t reuse or wait for the previous one, so if the last run is still going, the two run side by side. The Schedules list shows each schedule’s next run, and links to the task it created the last time it fired.
Run now
Section titled “Run now”The run button on a schedule’s row creates a task from the schedule straight away, the same task it would create when it fires. It works on disabled schedules too, and it doesn’t change the schedule’s next run or its last run.
Editing, disabling and deleting
Section titled “Editing, disabling and deleting”Changes to a schedule apply to the tasks it creates from then on; tasks it already created keep their settings. Changing the cron expression or timezone moves its next run. Turning a schedule off clears its next run; turning it back on schedules the next due time from now, without catching up on the runs it missed. Deleting a schedule doesn’t touch the tasks it created.