ignitify_schedule
A recurring schedule of a task. At each slot of a cron expression, the platform starts a run of the task's newest ready deployment, with the payload and run settings given here. A code update keeps the schedule. Needs schedules.read and schedules.write (tasks.read to import), and a plan with room for one more schedule. The resource works from provider 0.4.0. To grant schedules.read and schedules.write with ignitify_group, use provider 0.5.0 or later.
Example
# Every night at 03:00 Berlin time. The task comes from the deployment, so the
# schedule is created after the first build is ready.
resource "ignitify_schedule" "nightly" {
task = ignitify_deployment.report.task
cron = "0 3 * * *"
timezone = "Europe/Berlin"
# Stored in the state in plain text: never put a secret here.
payload = jsonencode({ day = "yesterday" })
timeout_sec = 600
overlap = "skip"
}Arguments and attributes
| Name | Type | Use | Meaning |
|---|---|---|---|
task | String | Requiredforces replacement | The slug of the task. |
cron | String | Required | A 5-field cron expression, or a nickname such as @daily. The server checks it at apply. |
payload | String | Required | The run payload as JSON (use jsonencode). Stored in the state in plain text: never a secret. Empty after an import, so the first apply sends it. |
timezone | String | Optional | The IANA time zone of the expression. Default UTC. Write the canonical name, for example Europe/Berlin. |
overlap | String | Optional | What a slot does while the previous run is live: skip (default) or allow. |
paused | Boolean | Optional | Whether the schedule is paused. Default false. |
preset | String | Optional | The run preset. Unset: the deployment's at each slot. |
timeout_sec | Number | Optional | The run timeout in seconds. Unset: the deployment's at each slot. |
deadline_sec | Number | Optional | A hard limit on the run's total time, in seconds. At least the timeout. Unset: no deadline. |
execution | String | Optional | The run's execution settings as JSON. Unset: the deployment's at each slot. |
status | String | Read-only | active, paused or auto_paused (paused by the platform; see pause_reason). |
pause_reason | String | Read-only | Why the platform paused the schedule: consecutive-misses, plan-limit or invalid-schedule; null unless status is auto_paused. |
pause_detail | String | Read-only | For plan-limit, the plan field that refused (max_schedules: the plan does not include recurring schedules); for invalid-schedule, why the expression cannot fire; otherwise null. Provider v0.4.1 or newer. |
payload_sha256 | String | Read-only | The server's digest of the stored payload. It changes only when the payload changes. |
schedule_id | String | Read-only | The server id (sch_…). The import id is <task slug>/<schedule_id>. |
created_by | String | Read-only | The id of the API key that created the schedule. |
created_at | String | Read-only | When the schedule was created (ISO 8601). |
Behaviour
- Each slot runs the task's newest ready deployment, so a code update needs no change here.
- A change made outside Terraform shows in the next plan: a pause, a new payload, another zone or expression. The apply puts the configured values back.
- The platform pauses a schedule after too many missed slots in a row, or when the plan no longer allows what it runs. Then
statusisauto_pausedand every plan warns. Terraform does not resume it on its own: fix the cause, then resume it withignitify schedule:resume. If the plan does not include recurring schedules (pause_detailismax_schedules), the resume is refused: change plan first. - When the monthly compute of the plan is spent, slots are missed until the allowance resets. These misses do not pause the schedule.
- A resumed schedule fires from its next slot. It does not catch up the slots it missed.
- Deleting the task deletes its schedules.
- The plan limits how many schedules a tenant holds. One more is refused at apply with
schedule-quota. The Free plan does not include schedules: a create there is refused withcapability-denied, and so is a resume or an apply that setspaused = false. Change plan first.
Import
The import id is <task slug>/<schedule_id>. After an import, payload is empty, so the first apply sends the configured payload.
$ terraform import ignitify_schedule.nightly report/<schedule_id>