Quick reference
Four layers between a cron line and a page at 3 am.
Trigger: Cron schedule (CRON), Webhook event (HOOK), Manual run (CLI)
Run: Runner (EXEC), Secret broker (SEC), Concurrency lock (LOCK)
Verify: Health probe (PRB), Output assertion (CHK), State diff (DIFF)
Report: Run log (LOG), Metrics (MET), Alert route (PAGE)
Flow: Cron schedule → Runner; Webhook event → Runner; Runner → Health probe; Runner → Output assertion; Health probe → Run log; Output assertion → Metrics; Metrics → Alert route
Across all layers: Last run status (EXIT), Timer drift (LATE), Lock still held (LOCK), Alert route (PAGE)
In one line: A trigger is not a schedule. If nobody sees the failure, the job is a rumour.
Read the last run:
systemctl list-timers --allExplained
Trigger
A cron line, a webhook, a queue message, or a hand on the keyboard. The trigger decides how the run starts and what happens when it does not. A timer that misses its window is the quietest failure in the stack, because nothing runs and nothing complains.
Run
A runner, an identity, a lock, a timeout. The lock matters more than the runner: two copies of a job writing one file will corrupt it, and flock is cheaper than the incident. Secrets arrive from a broker at run time, never from the repository.
Verify
Exit code zero means the process ended, not that the work happened. Probe the output: a row count, a checksum, a health endpoint. Assert the thing you promised, not the thing the tool printed.
Report
A log line, a metric, a route to a person. If the only report is an email nobody opens, the layer is decoration. The report is what turns a run into a record.
The honest caveat: four layers for a job that copies one file is over-engineering, and the layers then hide the simple failure.
The lesson: name the layer that pages you, or the stack has no top.
Your turn: Which layer in your setup would fail without a sound?
Related on this site
More notes: Automation & tooling
- P1061Release automation commands
- P1060Five rules for credential automation
- P1059Observability as code
- P1058Scaffolding a new service from a template
- P1057Four numbers for automation
- P1056Idempotent scripts and safe re-runs
- P1055Cron to systemd timer: the migration path
- P1054Five signs your automation is fragile
Open in the notes app: search, filters, copy This note on GitHub