Use it when designing, operating or troubleshooting Linux Automation behavior around cron. Keep target scope, execution context, operation result, platform read-back and workload acceptance as separate proof boundaries.
cron · Linux Automation
cron Automation manages scheduled Linux jobs while keeping crontab persistence, scheduler ownership, environment, execution evidence and job outcome distinct.
1. cron for scheduled tasks; manage entries via automation (ansible.builtin.cron).
2. Full paths, logging, locks.
3. Avoid editing crontabs by hand.
4. Consider systemd timers.
5. Document schedules.
managed entry → cron → job
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
schedule intent → owner/crontab persistence → scheduler state → cron environment → invocation → exit/log evidence → downstream state → next-run verification
Healthy evidence: schedule and owner are explicit, execution environment is controlled, invocations are observable and downstream results are verified.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: manual tests pass but cron runs under a different environment or silently fails without downstream evidence.
It does not show every adjacent identity, network, application or dependency condition. cron configuration shows scheduling intent only; successful downstream execution must be observed separately.
Step 3 Branching troubleshooting Narrow the fault
Concrete boundaries: trigger → queue accepted → worker lease/pickup → task running → terminal result → target mutation/read-back → effective runtime state → workload.
Step 4 Common mistakes Narrow the fault
- Missing PATH in cron.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Crontab entry exists ≠ scheduler executed it.
- Manual command success ≠ cron environment success.
- Job invoked ≠ job outcome succeeded.
- No email/output ≠ no failure.
crontab -l -u <user>— user croncat /etc/cron.d/*— system cron- cron module in Ansible — managed entries
ReferenceWhat it is1 section · depth on demand
Core model
Trace desired schedule and owner to installed crontab/timer context, scheduler availability, execution environment, actual invocation, exit/log evidence and downstream result.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
cron configuration shows scheduling intent only; successful downstream execution must be observed separately.
Close with Follow one job ID through queue and worker, verify exactly-once/idempotent target outcome, read effective state and run the original workload after terminal completion. and state what the evidence does not show.
In depth
cron runs commands on a schedule on Linux and Unix. Each line in a crontab has five time fields followed by the command; the cron daemon checks every minute.
# m h dom mon dow command
30 2 * * * /opt/net/backup.sh >> /var/log/net-backup.log 2>&1
*/15 * * * 1-5 /opt/net/check-links.sh
0 6 1 * * /opt/net/monthly-report.sh
crontab -e # edit current user's crontab
crontab -l
ls /etc/cron.d/ # system crontabs with a user field
cron runs with a minimal environment (PATH, no profile) — use absolute paths and set variables in the script. Redirect output to a log or it is mailed or lost, use flock to prevent overlapping runs, and consider systemd timers for logging and missed-run handling.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Automation > cron. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.ansible.com/ansible/latest/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
cron automation proof-boundary map
Fast scope, execution, platform-state and workload-acceptance boundaries for cron.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Scope / identity | Exact source revision, hosts and execution identity are explicit | Selector drift, stale inventory or wrong token changes scope/authority |
| Operation | Tool/provider action and per-host result are traceable | Partial failure, hidden error semantics or environment differences are lost |
| Platform state | Persistent and effective state are read back | Command/cmdlet success is mistaken for convergence |
| Workload proof | Original service/application acceptance passes | Automation summary substitutes for actual runtime behavior |