Skip to content

Schedules and retention

Administration → Settings → Schedules & retention holds three things: cron schedules, run-history retention and audit-log retention. A separate chart value controls how long runner pods stay in Kubernetes.

Schedules

A schedule launches or syncs one resource on a cron expression.

Kind What happens Requirement
Project Git sync —
Inventory Project sync, then inventory sync Git inventory
Template A run, as if launched by hand Ansible templates need a default inventory; required survey questions need valid defaults
Workflow A workflow run Must resolve without launch input (inventories set, survey defaults valid)

Rules:

  • Five-field cron in UTC — not your browser's time zone. 0 6 * * 1-5 is 06:00 UTC on weekdays; in Kyiv that is 08:00 in winter and 09:00 in summer.
  • Up to 100 schedules. Each can be enabled or disabled without deleting it.
  • The controller checks schedules every 30 seconds under the PostgreSQL coordination lock, so with several controllers each due time fires once. No Kubernetes CronJobs are created.
  • After downtime, a schedule runs once to catch up, not once per missed slot.
  • Each scheduled launch gets an ID derived from the schedule and its due time, so a retry after a crash never launches twice.
  • Scheduled runs may overlap with earlier ones and with manual runs; the global runner limit still applies.
  • A schedule's success means the launch was accepted. Whether the run succeeded is in Jobs. Scheduled runs are launched by System.

Saving validates every schedule: the resource exists, the cron is valid and has a next occurrence, and templates or workflows would resolve.

History retention

Off by default. When enabled, the controller checks hourly and deletes finished runs older than the configured age.

Setting Default Range
Enabled off —
Days 30 1–3650
Include failed runs off Keep failed runs for investigation unless enabled

What is deleted: the whole finished run with its steps, captured output (including archived chunks, which are queued for removal from the bucket), saved Terraform plans of those runs, and leftover runner Jobs, pods and ConfigMaps. System jobs follow the same policy.

What is not deleted: active runs, templates, workflows, credentials and their Vault values, Terraform state and state versions, and the audit log.

The page shows how many runs are currently eligible before you enable it.

Audit-log retention

The audit trail (Administration → Security → Audit logs) records resource changes, run and step transitions, approval decisions and sign-ins, with UTC time, actor, action and resource ID — never values, scripts, tokens or credentials.

Audit log retention in days is independent of run history. 0 keeps everything. A positive value deletes older events at the next hourly check — lowering it can delete existing events immediately.

The audit log is written in the same database transaction as each change, but it is application data: a database administrator can change it. For tamper-evident records, export it to your log platform.

Runner cleanup

Separate from history: finished runner Jobs, pods and ConfigMaps are removed jobRetentionSeconds after the step ends (chart default 300). The controller first makes sure the output is captured; a runner whose output capture failed is kept and retried. Unrelated Jobs in the namespace are never touched. Each cleanup is recorded as a system job when it removes something.

Through the API

GET /api/admin/maintenance returns the settings plus eligible_runs. PUT /api/admin/maintenance replaces them — read first, change, write back the whole object:

{
  "schedules": [
    {"id": "nightly-sync", "kind": "projects", "resource_id": "<project-id>", "cron": "0 2 * * *", "enabled": true},
    {"kind": "workflows", "resource_id": "<workflow-id>", "cron": "30 5 * * 1-5", "enabled": true}
  ],
  "retention": {"enabled": true, "days": 90, "include_failed": false, "audit_days": 365}
}

Keep existing ids so that unchanged schedules keep their next run time; entries without an id get a new one.