Executions
The lifecycle of a run, its statuses, logs, cancellation and retries.
Every run of a job is an execution. Executions start from one of three
sources: manual (CLI, dashboard or API, including one-off schedules), cron,
or trigger.
Statuses
| Status | Meaning |
|---|---|
scheduled | Waiting to run, either as soon as possible or at a set time. |
running | The runner is executing the job. |
success | install (if any) and cmd both exited with code 0. |
fail | A command exited non-zero, or the run couldn't start. See error_code. |
cancelled | Cancelled while still scheduled. |
missed | A cron run that couldn't start within 5 minutes of its time. |
scheduled ──► running ──► success | fail
│
├──► cancelled (cancel request, or the cron schedule changed)
└──► missed (cron only, more than 300 s late)There is no separate "queued" status: scheduled covers both.
Error codes
A failed execution may carry an error_code:
error_code | Cause |
|---|---|
missing_secrets | The job declares secrets that aren't set in the project. The code never ran. |
quota_exceeded | The team was out of execution minutes when the run started. See Billing. |
orphaned | The worker running it stopped sending heartbeats for over 5 minutes (for example, the server restarted mid-run). |
A plain non-zero exit leaves error_code empty; read the log.
Logs
When a run finishes, its output is stored and exposed as log_url on the
execution (in the dashboard's View Logs button, the API, and execution
webhooks).
- The log contains all of stdout (the
installstep, thencmd) followed by all of stderr. The two streams are not interleaved by time. - Logs are only available after the run ends; there is no live streaming.
log_urlis a pre-signed link that expires after 7 days.
Duration
duration is in microseconds and covers the whole run, including install.
Billing rounds each run up to whole minutes.
Cancelling
You can cancel an execution only while it is scheduled, from the dashboard or
with PUT /api/v1/jobs/{execution_id}/cancel. A running execution can't be
stopped. Cancelling a pending cron run skips that slot; the next one is
scheduled within a minute.
Retries
Aperture doesn't re-run failed executions. If you need retries, build them into your code or start a new run.
Live updates
The dashboard updates executions in real time over a websocket. See Realtime.