Run on a schedule
A recurring schedule starts a run of a task at each slot of a cron expression, for example every night at 03:00 or every 10 minutes. Each slot runs the newest READY deployment of the task, so a new deploy changes what the next slot runs and keeps the schedule.
To start one run at a set time, use Run later. For a worked example, see the uptime check tutorial.
| Command | What it does |
|---|---|
schedule:preview | Shows the next fire times of an expression. It creates nothing. |
schedule:create | Creates a recurring schedule for a task. |
schedule:list | Lists your schedules, one-time and recurring. |
schedule:show | Shows one recurring schedule: its state, run settings and next fire times. |
schedule:update | Changes a schedule in place. The id and the runs stay. |
schedule:pause | Stops a schedule from firing. |
schedule:resume | Lets a paused schedule fire again. |
schedule:cancel | Deletes a schedule. The runs it started stay. |
1 · Check the expression
schedule:preview prints the next five fire times in UTC. --tz sets the IANA time zone that the expression reads in. The default is UTC.
$ ignitify schedule:preview "0 9 * * 1-5" --tz America/New_Yorkcron 0 9 * * 1-5timezone America/New_YorkNext fire times (UTC; the expression reads in America/New_York) • 2027-01-15T14:00:00.000Z • 2027-01-18T14:00:00.000Z • 2027-01-19T14:00:00.000Z • 2027-01-20T14:00:00.000Z • 2027-01-21T14:00:00.000Z
An expression has five fields. Put it in quotes.
| Field | Values |
|---|---|
| minute | 0 to 59 |
| hour | 0 to 23 |
| day of month | 1 to 31 |
| month | 1 to 12, or jan to dec |
| day of week | 0 to 6 (0 is Sunday), or sun to sat |
- Each field takes a number,
*, a list (1,15), a range (1-5) and a step (*/10). - The nicknames
@hourly,@daily,@weekly,@monthlyand@yearlyalso work. - A seconds or a year field (six or seven fields) is refused. The extensions
L,W,#and?are refused too.
| Expression | Fires |
|---|---|
*/10 * * * * | Every 10 minutes. |
0 3 * * * | Every day at 03:00. |
0 9 * * 1-5 | At 09:00, Monday to Friday. |
0 0 1 * * | At midnight on the first day of each month. |
2 · Create the schedule
schedule:create takes the task and the expression. Deploy the task first: a slot with no READY deployment does not run.
$ ignitify schedule:create image-resize --cron "0 3 * * *" --tz Europe/Berlin --timeout-sec 120✓ Schedule Createdschedule_id sch_Vb7LmQ2sXe9Ktask_name image-resizecron 0 3 * * *timezone Europe/Berlinoverlap skipstatus ACTIVEnext_fire_at 2027-01-15T02:00:00.000Z…Next fire times (UTC; the expression reads in Europe/Berlin) • 2027-01-15T02:00:00.000Z • 2027-01-16T02:00:00.000Z …
These flags set what every run of the schedule gets:
| Flag | Meaning |
|---|---|
--tz | The IANA time zone of the expression, for example Europe/Berlin. The default is UTC. |
--payload | The JSON input of every run. The default is an empty object. |
--preset | The instance class of every run. The default comes from the task.yaml of the deployment. |
--timeout-sec | The time limit of every run. The default comes from the task.yaml of the deployment. |
--deadline-sec | A hard wall-clock limit of every run. It must be at least the time limit. |
--overlap | skip (the default): a slot starts nothing while the last run of the schedule is still active. allow: the slot starts a run anyway. |
3 · See what it does
schedule:list shows all your schedules with their task names. schedule:show shows one schedule with its state, its last slot and its next fire times. run:list --schedule shows the runs it started.
$ ignitify schedule:list
ignitify schedule:show sch_Vb7LmQ2sXe9K
ignitify run:list --schedule sch_Vb7LmQ2sXe9KRead these fields first:
| Field | Meaning |
|---|---|
status | active fires. paused: you paused it. auto_paused: the platform paused it (see step 8). |
state_text | Why the schedule does not run, in plain words. Empty while it is active. |
last_outcome | What the last slot did: fired, or the reason it did not run (see step 7). |
last_outcome_text | The same, in plain words. |
consecutive_misses | Slots in a row that did not run for a cause you can fix. A run that starts sets it to 0. |
run_settings | The preset and limits that you gave the schedule. It is in --json output only. |
payload_sha256 | The digest of the payload. It is in --json output only. |
4 · Change it
schedule:update changes a schedule in place. Its id, its runs and its miss count stay. Only the flags that you give change. It takes the same flags as schedule:create, except the task.
$ ignitify schedule:update sch_Vb7LmQ2sXe9K --cron "30 4 * * *"✓ Schedule Updated…✓ Schedule updated: sch_Vb7LmQ2sXe9K. The change applies from the next slot; a slot already queued and a run already started keep the old run settings.
- A new expression or time zone counts the next slot from now.
--payloadreplaces the whole payload. To check that it changed, comparepayload_sha256inschedule:show --json.- The status does not change. A paused schedule stays paused until you resume it.
- To move a schedule to another task, create a new schedule and delete the old one.
5 · Pause, resume and delete
schedule:pause stops a schedule from firing. A run that already started goes on. schedule:resume starts it again from its next slot. The slots that it missed while it was paused do not run.
$ ignitify schedule:pause sch_Vb7LmQ2sXe9K
ignitify schedule:resume sch_Vb7LmQ2sXe9Kschedule:cancel deletes the schedule. The runs that it started stay. It asks first; --yes skips the question, and a script needs it.
$ ignitify schedule:cancel sch_Vb7LmQ2sXe9K --yesWill cancel schedule sch_Vb7LmQ2sXe9K — it will never fire.✓ Schedule cancelled: sch_Vb7LmQ2sXe9K
6 · Read the slot in your task
Each run tells your task which run it is and, when a schedule started it, which slot it serves. ctx.run.id is the run_… id of the run. ctx.run.schedule_id is the sch_… id of the schedule, and ctx.run.scheduled_for is the slot time in UTC (ISO-8601, with milliseconds).
export async function run(_payload, ctx) {
const { id, schedule_id, scheduled_for } = ctx.run;
// a slot, e.g. sch_Vb7LmQ2sXe9K + 2027-01-15T02:00:00.000Z
const key = schedule_id ? `${schedule_id}:${scheduled_for}` : id;
// write to your database with this key, so one slot writes once
return { key };
}| Runtime | Fields; for a run that no schedule started |
|---|---|
| Node | ctx.run.id, ctx.run.schedule_id, ctx.run.scheduled_for; the two schedule fields are null. |
| Python | ctx.run.id, ctx.run.schedule_id, ctx.run.scheduled_for; the two schedule fields are None. |
| Go | ctx.Run.ID, ctx.Run.ScheduleID, ctx.Run.ScheduledFor; the two schedule fields are "". |
| Rust | ctx.run.id, ctx.run.schedule_id, ctx.run.scheduled_for; the two schedule fields are Option<String> and None. |
- Use
(schedule_id, scheduled_for)orctx.run.idas your idempotency key when the task writes to another system. A platform retry of a run keeps its id. - Go and Rust tasks get
ctx.Runandctx.runfrom the client in theirignitify/folder. Take it from CLI 3.5.0 or later: create the task again withtask:create, or copyignitify/from a new one, then deploy.
7 · When a slot does not run
When a plan limit stops a slot (runs at the same time, compute units or a rate limit), the slot waits and tries again. It gives up at its next slot or at its start deadline, whichever comes first. A slot that does not run sets last_outcome to one of these reasons:
| last_outcome | Why the slot did not run |
|---|---|
overlap-skipped | The last run was still active and overlap is skip. You get no notification. |
no-ready-deployment | The task has no READY deployment. Deploy it. |
run-settings | The preset, time limit, deadline or execution conflict with each other, or no plan can run them. Fix them with schedule:update or in task.yaml. |
superseded | A plan limit held the slot until its next slot. |
entitlement-lost | A monthly limit of your plan is reached. |
tenant-disabled | Your account is disabled. |
deadline-passed | The platform was late and skipped the slot. After a long delay, only the newest due slot starts. |
Each of these, except overlap-skipped, sends a schedule.missed notification. The skipped slot does not run later by itself. If you need it, run it by hand (step 9).
$ ignitify notification:list --kind schedule.missed8 · When the platform pauses a schedule
The platform pauses a schedule and sets status to auto_paused for one of three reasons. You get a schedule.paused notification. Read pause_reason in schedule:show, fix the cause, then run schedule:resume.
| pause_reason | Cause and fix |
|---|---|
consecutive-misses | 10 slots in a row did not run for a cause you can fix (no-ready-deployment, run-settings, or a wait on your own plan limit). last_outcome shows the last cause. Fix it, then resume. |
plan-limit | Your plan no longer allows what the schedule runs. pause_detail names the plan field. Change the run settings with schedule:update, or change plan, then resume. |
invalid-schedule | The expression or the time zone gives no next run time. Fix it with schedule:update, then resume. |
A slot that the platform skipped (deadline-passed), a spent monthly limit, an overlap skip and a disabled account do not count toward the 10.
9 · Run a past slot by hand
To test a schedule, or to run a missed slot again, start one run with task:run and put the slot time in the payload. A run that you start has no schedule, so ctx.run.scheduled_for is null. Let the task read the slot from the payload first.
export async function run(payload, ctx) {
const slot = payload.slot ?? ctx.run.scheduled_for;
// …do the work for this slot
return { slot };
}Find the payload of an earlier run of the schedule. run:get --full shows it under payload. If the schedule has no earlier run, use your own copy.
$ ignitify run:list --schedule sch_Vb7LmQ2sXe9K --limit 1
ignitify run:get run_H8kQ2mNxT4pL --fullThe schedule runs the newest READY deployment of the task. hook:list names it on its last line. Pass it with --deployment, and give the run an idempotency key, so a retry after a network error starts no second run.
$ ignitify hook:list hello
ignitify task:run hello --deployment 019f3c24-1b05-7c9a-8e21-4d6f0b93a7e2 \
--payload '{"slot":"2027-01-15T02:00:00.000Z"}' \
--idempotency-key sch_Vb7LmQ2sXe9K-2027-01-15T02-00Z --wait- The run uses the preset, the time limit and
executionthat the deployment stored from itstask.yaml. A slot also uses the run settings of the schedule (run_settingsinschedule:show --json). If the schedule sets a time limit, pass the same--timeout-sec. - Without
--deployment,task:runuses the deployment in the local state of the folder. That can be another deployment than the one the schedule runs. - For 24 hours, a key returns the first answer and starts nothing new. If the run failed, use a new key to run it again.
10 · Resume after a platform incident
A long platform incident can pause your schedules with pause_reason consecutive-misses. After the incident, resume only the schedules that it paused. Put the start of the incident, in UTC, in the filter, so that a schedule paused before it for another cause stays paused.
$ ignitify schedule:list --json | jq -r '.[]
| select(.kind=="cron" and .status=="auto_paused" and .pause_reason=="consecutive-misses"
and .updated_at >= "2027-01-15T01:00:00Z")
| .schedule_id' | xargs -n1 ignitify schedule:resumeA pause and a resume ask no question, so the loop runs in a script. A resume checks your plan again, and it does not catch up the missed slots. Run the slots you need by hand (step 9).
11 · Tell schedules apart
A notification names the sch_… id. schedule:show gives its task, expression, time zone and state. Two schedules of one task with the same expression differ only in the payload: compare payload_sha256 in schedule:show --json.
$ ignitify schedule:show sch_Vb7LmQ2sXe9K --json12 · End a schedule on a date
A schedule has no end date. Delete it on the day: from a reminder, a CI job or a Terraform destroy. A month range in the expression stops it inside one year: 0 3 * 1-3 * runs only from January to March.
$ ignitify schedule:cancel sch_Vb7LmQ2sXe9K --yes13 · Plans and permissions
- Recurring schedules come with a paid plan. On the Free plan, a create and a resume are refused with
capability-denied. See Pricing. - If you move to the Free plan, your schedules stay, but none of them runs: at its next slot each one is paused (
plan-limit). After you move to a paid plan again, resume them. - Your plan limits how many schedules you keep, and a paused schedule counts too.
whoamishowsmax_schedules. - The runs of a schedule count against your run limits like any run.
- A key needs
schedules.readto list and show schedules, andschedules.writeto create, change, pause, resume and delete them. See Users, groups and permissions.