Automated Schedules & Cron
Schedule automated recurring playbooks with saved run binding, cron cadences, visual 5-segment validation, and real-time execution tracking.
Running ad-hoc playbooks from the terminal or web dashboard works well for manual changes. But production infrastructure requires continuous, unattended maintenance: nightly database snapshots, weekly compliance audits, and regular package cache updates.
Setting up raw cron jobs across individual controller virtual machines quickly degrades into unmonitored infrastructure sprawl. If a cron script fails silently or triggers concurrently while a previous run is still writing to a database, teams only discover the failure during an outage.
CIEL centralizes recurring automation with Automated Schedules. Schedules run within the central controller engine, automatically prevent overlapping runs, stream real-time ANSI logs, and link directly to certified execution configurations.
1. Saved Runs as the Single Source of Truth
In CIEL, a schedule cannot point to an ambiguous or detached playbook file. Every schedule is bound directly to a Saved Run.
A Saved Run acts as the single source of truth (SSOT). It locks down the entire execution recipe before unattended execution ever triggers:
- Target Playbook: The exact YAML file tested and validated in Studio.
- Inventory & Host Scope: The explicit inventory or group filter (e.g.
Production Infrastructureor specific server nodes). - Execution Environment: The runtime engine, whether running on the host system or inside an isolated container runner (such as
quay.io/ansible/creator-ee). - Variable Precedence Stack: Attached workspace variable sets and extra vars required by the playbook.
This design prevents configuration drift. If an operator edits inventory hosts or tests temporary variables in Studio, the scheduled job continues executing strictly within its certified parameters.
2. Configuring a Schedule in the Drawer
Clicking + Add Schedule on the Schedules page (/schedules) opens the configuration drawer. The form contains four core inputs:
1. Schedule Name
A clear operational title (for example, Nightly Database Backup & Integrity Check or Weekly Security Compliance Audit). Names must be unique within the project to avoid operational confusion.
2. Target Saved Run
Select an existing Saved Run from the dropdown. Once selected, CIEL displays a live Execution Configuration Card directly below the selector, detailing:
- Target playbook name
- Target inventory and host count
- Execution mode (
NativeorPodman) - Count of attached variable sets
If no Saved Runs exist yet in your workspace, the drawer displays an actionable prompt directing you to create one first under the Saved Runs tab.
3. Cron Expression & Visual Inspector
CIEL evaluates standard 5-part POSIX cron syntax in UTC timezone:
┌───────────── Minute (0 - 59)
│ ┌─────────── Hour (0 - 23)
│ │ ┌───────── Day of Month (1 - 31)
│ │ │ ┌─────── Month (1 - 12)
│ │ │ │ ┌───── Day of Week (0 - 6, Sunday = 0)
│ │ │ │ │
* * * * *To eliminate syntax errors and confusing abbreviations, the input includes three assistive controls:
- Visual 5-Segment Field Inspector: A live grid directly below the input parses each token into its respective field (Minute, Hour, Day (Month), Month, Day (Week)) along with its accepted numeric range. Moving your cursor or typing in the input dynamically highlights the active segment tile. Clicking any tile focuses the input and selects that specific token for quick editing.
- Categorized Presets Dropdown: Clicking Presets opens an organized menu of tested production cadences:
- Frequent:
Every 5m(*/5 * * * *),Every 15m(*/15 * * * *),Every 30m(*/30 * * * *),Hourly(0 * * * *) - Daily:
Midnight (00:00)(0 0 * * *),Morning (08:00)(0 8 * * *) - Extended:
Weekdays 09:00(0 9 * * 1-5),Weekly (Mon)(0 0 * * 1),Monthly (1st)(0 0 1 * *),Quarterly(0 0 1 */3 *)
- Frequent:
- Live Humanized Description & Range Validation: The client-side parser translates the expression into natural English in real time (e.g.
Runs every 15 minutes (at :00, :15, :30, :45)orRuns Mon-Fri at 09:00 UTC). If a value exceeds bounds (such as minute65or month13), the invalid segment tile highlights in red and displays an exact error message (Minute value 65 is out of range (0-59)), blocking form submission until corrected. - Upcoming 3 Executions Preview: Displays the exact timeline for the next three runs, showing your browser local timezone, canonical UTC time, and relative countdown (
in 6m,in 21m,in 36m).
4. Active Switch
A toggle checkbox allowing you to create the schedule in an enabled state or save it in a paused state for later activation.
3. Automatic Overlap Prevention
When automating long-running tasks (such as full database backups or cluster upgrades), a previous execution might still be active when the next cron tick fires.
Running two instances of the same playbook simultaneously against identical database or storage targets can cause file corruption, deadlocks, and corrupted snapshots.
CIEL handles this with an automatic background safeguard:
- When a cron trigger fires, the controller inspects active jobs in the project.
- If any job belonging to that schedule is currently in a
pending,queued,preparing, orrunningstate, the incoming trigger tick is automatically skipped. - The controller records a warning in the logs noting that the previous job was still active.
- The schedule's
next_run_attimestamp advances to the next chronological interval. - The existing job finishes its run cleanly without interference.
4. Dashboard Controls & Operational Workflow
The Schedules dashboard (/schedules under RUNS & JOBS) provides complete operational visibility across recurring automations:
Table Columns:
- SCHEDULE: Displays the schedule title, the raw cron expression, and the execution runtime badge (
PODMANorNATIVE). - SAVED RUN: Shows the bound Saved Run template with a direct link to inspect its locked parameters.
- TARGET SCOPE: Outlines the target playbook and inventory (for example,
Linux Baseline HardeningonProduction Infrastructure). - EXECUTION TIMING: Shows the real-time countdown to the next execution (e.g.
Next: in 20horNext: in 3d), along with the timestamp and status badge of the previous run (Last: 3h ago [failed]). - STATUS: Indicates whether the schedule is
Active(green indicator) or paused. - ACTIONS: Contains the manual trigger button (
Run) and the context menu (...).
Table Actions:
- Active Toggle: Enable or pause any schedule directly with a single click. Pausing a schedule immediately unregisters its timer from the runtime engine without deleting its configuration or past run history.
Run(Manual Trigger): Dispatches an immediate execution of the schedule on demand (trigger_type: schedule_manual). This lets you verify credentials, variables, and playbook syntax right away without waiting for the scheduled cron time.- Context Menu (
...): Quick access to edit the schedule name and cadence, view past execution logs, or delete the schedule.
5. Access Control & Unattended Execution Safety
Because scheduled automations run unattended in the background, CIEL enforces strict security constraints:
- Creator Attribution: Every schedule stores the ID of the operator who created it.
- RBAC Validation: Before enqueuing an automated run, the background worker verifies that the creator account is active and holds appropriate project permissions (
owner,maintainer, oroperator). - Orphan Protection: If an operator account is deactivated or removed from the project, scheduled ticks for their jobs are automatically blocked and logged with an audit trace rather than executing with unvalidated credentials.
- Credential Isolation: Temporary SSH keys and vault tokens are injected only into the transient runner workspace for the duration of the job, and wiped immediately upon completion.
6. External References
For upstream standards on cron syntax and unattended automation best practices:
- POSIX Crontab Specification: Standard format and syntax definitions for cron schedules.
- Ansible Idempotence Guidelines: Designing playbooks that safely produce identical results across recurring scheduled runs.
- Ansible Error Handling: Best practices for
ignore_errors,failed_when, and alert integration during unattended execution.