Schedules
Schedules allow you to automatically run tasks on a recurring cadence.
Creating schedules
typescriptCopied1// my_task.airplane.ts2export default airplane.task(3{4slug: "my_task",5schedules: {6midnight_daily: {7cron: "0 0 * * *",8},9},10},11async () => {...}12);
javascriptCopied1// my_task.airplane.js2export default airplane.task(3{4slug: "my_task",5schedules: {6midnight_daily: {7cron: "0 0 * * *",8},9},10},11async () => {...}12);
pythonCopied1# my_task_airplane.py2@airplane.task(3schedules=[4airplane.Schedule(5slug="midnight_daily",6cron="0 0 * * *",7),8],9)10def my_task():11pass
In your task definition file (the file with extension
.task.yaml
):yamlCopied1# my_task.task.yaml2schedules:3midnight_daily:4cron: "0 0 * * *"
You can create a new schedule from the individual task page:

Configure a cadence, name and description from the UI wizard:

Cron syntax
The recurrence schedule is defined using cron syntax, with times specified
in UTC. In addition to standard cron characters, Airplane supports the following:
Character | Valid Fields | Example |
---|---|---|
L | Day of Week | 5L ("last Friday of the month") |
# | Day of Week | 5#3 ("third Friday of the month") |
W | Day of Month | 1W ("nearest weekday to the 1st of the month") |
Sample cron expressions
Cron expression | Meaning |
---|---|
0 12 * * * | Daily at 12:00 UTC |
0 17 * * 5 | Every Friday at 17:00 UTC |
0 12 * * 3#1 | First Wednesday of the month at 12:00 UTC |
*/30 12-17 * * MON-FRI | Every half hour between 12:00 UTC and 16:59 UTC on weekdays |
0 12 15 */2 * | Every 15th of the month at 12:00 UTC, every two months (starting in January) |
Archiving schedules
Schedules can be archived to temporarily or permanently prevent them from running. They may be
unarchived at any time, as long as the task is also unarchived.
If a task is archived, all of its active schedules are also archived. Unarchiving a task does not
automatically unarchive all of its associated schedules.
Schedule permissions
Schedules run as their creator, meaning if you schedule a task and it runs the next day, Airplane
will execute the task as you (the creator). If the creator no longer has access (e.g. due to the
creator leaving the Airplane team), the schedule will automatically be paused.
Invalid schedules
It is possible for schedules to become invalid; e.g., adding or changing parameters to the task, or
the schedule creator losing permissions to execute it. In these cases, the schedule will be moved
into a paused state, and an alert will show up next to the schedule indicating why the schedule has
been automatically paused.
You can unpause a schedule by editing it in the app and re-saving it.
Schedule concurrency
Schedules are designed to start a task based on a custom recurrence schedule. However, if the last
execution has not yet finished, a new execution will only be started after the last execution has
finished. For a given schedule, at most one execution will be in an active state at any time.
For example, a schedule that executes every five minutes will normally execute a run at 10:00,
10:05, 10:10, etc. If a run that starts at 10:15 takes 12 minutes, the next run will start at 10:27
at the earliest; the next run after that will start at either 10:30 or when the 10:27 run has
finished, whichever is later.
Schedules and environments
Tasks can be configured with different schedules, depending on the environment. See
Environment-based task configuration for details.