Scheduled tasks
Create the same task again on a schedule — cron expressions in a time zone, overlap handling, running one now, and what happens to missed runs.
A schedule creates the same task again and again: nightly dependency updates, a weekly review, a flaky-test sweep.
Manage schedules on the Schedules page (managers and above; permission project.update) or through
/orgs/:orgId/schedules in the API.
Not the scheduler
This page is about tasks created at set times. How a queued task reaches a worker is described in Scheduling.
When
A five-field cron expression — minute hour day-of-month month day-of-week — read in an IANA time zone.
| Expression | Time zone | Runs |
|---|---|---|
0 2 * * * | Europe/Berlin | Every day at 02:00 Berlin time |
*/15 9-17 * * mon-fri | America/New_York | Every 15 minutes during working hours |
0 6 1,15 * * | UTC | On the 1st and 15th at 06:00 |
@weekly | UTC | Sunday at 00:00 |
Lists (1,15), ranges (mon-fri), steps (*/15), month and day names, and @hourly, @daily, @weekly and
@monthly work. As in cron, when both day fields are restricted, a day matches if either does. A schedule can run
every 5 minutes at most.
What
A task title and prompt, kind (standard or plan), priority and policy. {date} in the title and prompt becomes
the day of the run (YYYY-MM-DD).
curl -X POST "$AO_SERVER/api/v1/orgs/$AO_ORG/schedules" \
-H "Authorization: Bearer $AO_TOKEN" -H "Content-Type: application/json" \
--data '{
"name": "Nightly dependency updates",
"projectId": "prj_123",
"cron": "0 2 * * *",
"timeZone": "Europe/Berlin",
"task": {
"title": "Update dependencies ({date})",
"prompt": "Update dependencies to the latest patch versions and fix anything that breaks.",
"priority": "LOW"
}
}'Overlap
By default (overlap: "skip") a run is skipped while the task of the previous run is unfinished. A task waiting
for manual recovery does not hold later runs back. Choose Create another task anyway to allow overlap.
Run now creates the task at once, as you, without moving the next run.
Who the task belongs to
Tasks are created on behalf of the member who made the schedule (or last changed what it runs), with that member's current role. If the member leaves the organization, the schedule turns itself off and says so; save it again to take it over.
Missed runs and timing
- A run missed while the server was down runs once when the server is back. Earlier missed runs are not made up.
- With several API instances, each run still creates one task.
- Runs start within one sweep interval of their time (
SWEEP_INTERVAL_MS, 10 seconds by default).
Spend budgets apply to scheduled tasks like any other.