Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

cron · Linux Automation

Direct answer

cron Automation manages scheduled Linux jobs while keeping crontab persistence, scheduler ownership, environment, execution evidence and job outcome distinct.

When to use this

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.

First 30 seconds

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.

Operational verification

managed entry → cron → job

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Linux systems automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformLinux systems automation · Linux Automation → cron owns recurring Linux job automation; generic scheduled automation and application job semantics remain separate.
Scope / prerequisiteUse it when designing, operating or troubleshooting Linux Automation behavior around cron. Keep target scope, execution…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

4 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points
  • Crontab entry exists ≠ scheduler executed it.
  • Manual command success ≠ cron environment success.
  • Job invoked ≠ job outcome succeeded.
  • No email/output ≠ no failure.
Key checks
  • crontab -l -u <user> — user cron
  • cat /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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docLinux systems automation current

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%
Terminology layer

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.

Aliases that resolve here
cron automationlinux scheduled job automationautomate crontab
Embedded reference data

Quick lookup tables

cron automation proof-boundary map

Fast scope, execution, platform-state and workload-acceptance boundaries for cron.

BoundaryHealthy evidenceSuspicious evidence
Scope / identityExact source revision, hosts and execution identity are explicitSelector drift, stale inventory or wrong token changes scope/authority
OperationTool/provider action and per-host result are traceablePartial failure, hidden error semantics or environment differences are lost
Platform statePersistent and effective state are read backCommand/cmdlet success is mistaken for convergence
Workload proofOriginal service/application acceptance passesAutomation summary substitutes for actual runtime behavior
Confirmation

Confirm action

Continue?