Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Scheduling

Direct answer

Scheduling runs jobs automatically at set times: cron (crontab, /etc/cron.d, /etc/cron.daily …), systemd timers, and at for one-off jobs.

When to use this

Use it to automate recurring tasks, or when a scheduled job did not run or failed.

First 30 seconds

1. Which scheduler: cron or systemd timer?

2. Did it start? cron log (journalctl -u cron/crond) or systemctl list-timers.

3. Run the command by hand as the same user with a minimal env: env -i /bin/sh -c '<cmd>'.

4. Output/errors captured? Add >> /var/log/job.log 2>&1.

5. Fix paths or permissions and wait for the next run.

Operational verification

schedule defined → scheduler triggers at the time → job runs as the user with a minimal environment → exit status and output logged

Evidence · next step

For Scheduling, continue with the first unproven Topic check: Record scheduler, owner, exact expression/calendar, timezone, expected trigger time and original workload acceptance test. If that boundary is healthy, advance to the adjacent check: Read back effective loaded schedule and eligibility including enablement, daemon/timer state and any persistent/catch-up semantics. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
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
Key commandcrontab
Scope / prerequisiteUse it to automate recurring tasks, or when a scheduled job did not run or failed.
Reference · 2
What next?3 suggested next steps
Child topics (this level)3
Catalog command links2
Evidence1
On this pageJump to a specific section
Linux command reference

Primary Commands

Configuration and operational commands for this Topic.

crontabReference
crontab

List, install, edit or remove per-user cron schedules.

Use when: Primary lookup intent: configure. Use crontab when the lookup goal is to list, install, edit or remove per-user cron schedules. Tie the result to the same host, namespace, user identity and time window as the symptom.

Quick note: Post-change verification for crontab: Read back the effective crontab and verify scheduler logs plus the job effect at the next controlled trigger. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: changes_state. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. crontab is documented as an operational lookup primitive under Scheduling. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.

Linux · service
atReference
at

Queue commands for one-time execution by the at daemon at a specified time.

Use when: Primary lookup intent: configure. Use at when the lookup goal is to queue commands for one-time execution by the at daemon at a specified time. Tie the result to the same host, namespace, user identity and time window as the symptom.

Quick note: Post-change verification for at: Confirm queue state, execution logs and the actual target effect at or after the intended trigger. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: changes_state. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. at is documented as an operational lookup primitive under Scheduling. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.

Linux · service
Operational workflow

Verification & Troubleshooting

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

5 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 source → scheduler load/enablement → clock + timezone → eligibility/next trigger → execution identity/environment → process start → exit/result → target read-back → workload acceptance

Healthy evidence: the authoritative schedule is loaded, next/last trigger evidence matches the intended clock basis, the job starts under the expected identity/environment, and the target state/workload verifies.

Step 2 Commands Verify boundary
crontab -l
systemctl list-timers
ls /etc/cron.d
Step 3 Verification and output interpretation Verify boundary

Verification path. Verify current wall time/timezone, synchronization state and source quality rather than only daemon-active status. Compare offset/stratum/reach or chrony tracking/sources and confirm DNS/network reachability to time sources. For scheduled jobs, inspect the scheduler’s calculated next/last trigger, unit/job exit status and resulting side effect. Correlate logs using monotonic/boot identifiers when wall-clock corrections could reorder timestamps.

Existing fast checks for this Topic. - Record scheduler, owner, exact expression/calendar, timezone, expected trigger time and original workload acceptance test.

  • Read back effective loaded schedule and eligibility including enablement, daemon/timer state and any persistent/catch-up semantics.
  • Correlate the trigger window with logs/process evidence, effective identity, environment, working directory, command path and exit/status data.
  • Change one demonstrated cause, then wait for or deliberately reproduce the scheduled path and verify the original target state plus a regression run.

Verification chain. schedule source → scheduler load/enablement → clock + timezone → eligibility/next trigger → execution identity/environment → process start → exit/result → target read-back → workload acceptance

Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: the schedule exists only on disk, timezone assumptions differ, scheduler is disabled, PATH/environment differs from an interactive shell, overlapping/missed triggers occur, or scheduler reports success while the target state is wrong.

It does not show behavior outside the captured host, clock/timezone, scheduler or time-daemon instance, identity/environment, source, trigger/measurement interval or workload scope. Scheduling is verified only when the exact scheduled path—not merely a manual invocation—is shown to trigger under the intended identity/environment and the original workload result is read back successfully.

Next check: Continue from the first unproven scheduling/time boundary: preserve the original timing and execution/source context, capture the adjacent scheduler/process or clock/source state, change only the demonstrated cause, then repeat the original scheduled or time-sensitive workload and regression checks.

Step 5 Common mistakes Narrow the fault
  • Jobs depending on the login shell environment.
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
Drill down

Subtopics

Go one level deeper into this subject.

Key points

Scheduled jobs run with a minimal environment (short PATH, no aliases, no terminal) — use full paths and log output. Check whether the scheduler ran the job before debugging the job itself.

Key checks
  • systemctl list-timers --all — systemd timers and next run
  • crontab -l -u <user> — a user's cron jobs
  • ls /etc/cron.d /etc/cron.daily — system cron jobs
  • journalctl -u cron -u crond --since today — cron executions
ReferenceWhat it is1 section · depth on demand

Core model

Start with the exact schedule owner, scheduler type, expression/calendar, timezone, execution identity, working directory and environment. Show that the schedule is loaded and eligible, correlate the expected trigger window with scheduler logs/state, then separate process start, exit result and downstream workload verification. A configured job is only requested state; a trigger is only an accepted execution attempt.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

Scheduling is verified only when the exact scheduled path—not merely a manual invocation—is shown to trigger under the intended identity/environment and the original workload result is read back successfully.

In depth

Scheduling jobs on Linux: cron, timers and at

Linux offers several ways to run jobs later or on a schedule. The crontab(5) manual page defines cron's format:

  • Five time fields: minute, hour, day of month, month and day of week, with 0 or 7 for Sunday.
  • Shortcuts such as @reboot, @daily and @hourly.
  • Steps such as */15.

The manual also points out two traps. When both day of month and day of week are restricted, the job runs when either matches. And an unescaped % in the command becomes a newline.

Choosing a scheduler

NeedTool
A recurring job, simple and portablecron (crontab -e, /etc/cron.d/)
Recurring, with logging, dependencies, resource limits and catch-upsystemd timer
A one-off job at a timeat 02:00, or systemd-run --on-calendar=...
A job after boot@reboot in cron, or OnBootSec= in a timer
Spread across many hostsRandomizedDelaySec= in a timer

cron and systemd timers compared

cronsystemd timer
DefinitionOne lineA .timer and a .service
OutputMailed (MAILTO) or lostThe journal, per unit
Missed runs while offLost (unless anacron)Persistent=true
Overlapping runsPossibleA running service isn't started twice
EnvironmentMinimal; different from your shellFully defined in the unit
Listing all jobsSpread across user crontabs and filessystemctl list-timers

Seeing all scheduled jobs

host$ systemctl list-timers --all --no-pager | head -6
NEXT                         LEFT     LAST                         PASSED  UNIT
Sat 2026-11-28 15:00:00 CET  38min    Sat 2026-11-28 14:00:00 CET  21min   sysstat-collect.timer
Sun 2026-11-29 00:00:00 CET  9h left  Sat 2026-11-28 00:00:04 CET  14h ago logrotate.timer
host$ sudo ls /var/spool/cron/crontabs/ /var/spool/cron/ 2>/dev/null
host$ for u in $(cut -d: -f1 /etc/passwd); do sudo crontab -l -u "$u" 2>/dev/null | sed "s/^/$u: /"; done | grep -v '^.*: #'
host$ ls /etc/cron.d/ /etc/cron.daily/
host$ atq
host$ echo "systemctl restart report-api" | sudo at 02:30 tomorrow

An inventory of jobs

Jobs hide in many places: user crontabs, /etc/crontab, /etc/cron.d, the cron.* directories, timers and the at queue. When you take over a server, list them all, as above, before changing schedules or shutting the host down.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

Scheduling is part of Scheduling. Linux Scheduling is the operational reference for proving when and under which identity/environment a non-interactive job is expected to run, whether the scheduler actually triggered it, and whether the invoked workload completed with the intended effect.

Runtime state ownership and mechanics. Linux exposes wall clock, monotonic clocks, hardware RTC and timezone presentation as separate concepts. NTP/chrony disciplines the system clock from selected sources using offset, delay, jitter, reachability and clock-quality information. Cron and systemd timers schedule from calendar or monotonic semantics, and missed-run/persistence behavior differs. Time jumps, DST and suspend/resume can therefore affect schedules and logs in ways that simple clock display does not explain.

Topic-specific state model. Linux Scheduling is the operational reference for proving when and under which identity/environment a non-interactive job is expected to run, whether the scheduler actually triggered it, and whether the invoked workload completed with the intended effect.

Technical metadata. Host/VM, distribution/kernel/systemd/cron/chrony versions, wall-clock UTC/local time + numeric offset, monotonic/uptime context, timezone/tzdata, RTC/clocksource/virtualization, scheduler/unit/crontab owner, schedule expression/calendar/next+last trigger, effective user/group/environment/PATH/cwd, process/exit/output, time daemon/configured sources/selected source/stratum/reach/offset/delay/jitter/frequency/leap state, logs and original workload result.

Interpretation rule. - A schedule configured ≠ the scheduler loaded or enabled it.

  • A scheduler trigger ≠ the command started with the intended user, environment or working directory.
  • Exit code 0 ≠ the intended target state or downstream workload result was achieved.
  • One successful manual run ≠ the scheduled non-interactive execution path will behave the same.

Quick reference

Scheduling options on Linux:

ToolStrengths
cronSimple, universal, per-user crontabs
systemd timersLogging, dependencies, missed runs, resource limits
at / batchOne-off jobs
anacronDaily/weekly jobs on machines that are not always on
crontab -l; ls /etc/cron.d
systemctl list-timers
atq; echo 'reboot' | at 02:00 tomorrow

Whatever you choose, make jobs idempotent, log output, alert on failure, and avoid overlapping runs (flock).

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. Scheduling is verified only when the exact scheduled path—not merely a manual invocation—is shown to trigger under the intended identity/environment and the original workload result is read back successfully.

Model. A running NTP daemon can be unsynchronized, and a low stratum number does not guarantee a good local measurement. Timezone changes alter presentation/scheduling without directly changing UTC. Cron entry presence does not show execution or successful job outcome. systemd timer activation shows a trigger, not the service result. TLS, Kerberos, DNSSEC and distributed logs can fail because of time even when ordinary connectivity is healthy.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Configuration intent and lifecycle. Set authoritative timezone separately from time synchronization sources. Configure NTP servers/pools and access policy through the active implementation, and avoid running competing time daemons. For scheduled work, choose cron or systemd timer semantics deliberately, including timezone, persistent catch-up and dependency/environment requirements. Remember that cron/systemd environments are not interactive shells and should declare paths/credentials explicitly.

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 current

Authoritative/upstream documentation reviewed for bounded claims in Scheduling. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
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
linux schedulingscheduled jobs linuxcron systemd timerslinux job scheduling
Embedded reference data

Quick lookup tables

Scheduling operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Scheduling.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateLinux Scheduling is the operational reference for proving when and under which identity/environment a non-interactive job is expected to run, whether the scheduler actually triggered it, and whether the invoked workload completed with the intended effect.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin exact symptom + clock/trigger time → identify authoritative scheduler or time daemon → read back effective configuration/runtime state → reproduce or observe the expected event/source measurement → correlate identity/environment/offset/status with logs → change one demonstrated cause → read back stable state → repeat original scheduled or time-sensitive workload + regression check.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainschedule source → scheduler load/enablement → clock + timezone → eligibility/next trigger → execution identity/environment → process start → exit/result → target read-back → workload acceptanceTrace requested/configured state through effective state to the observed workload result.
Failure boundaryScheduling is verified only when the exact scheduled path—not merely a manual invocation—is shown to trigger under the intended identity/environment and the original workload result is read back successfully.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux scheduling/time evidence can establish this proof path: schedule source → scheduler load/enablement → clock + timezone → eligibility/next trigger → execution identity/environment → process start → exit/result → target read-back → workload acceptanceUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured host, clock/timezone, scheduler or time-daemon instance, identity/environment, source, trigger/measurement interval or workload scope. Scheduling is verified only when the exact scheduled path—not merely a manual invocation—is shown to trigger under the intended identity/environment and the original workload result is read back successfully.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven scheduling/time boundary: preserve the original timing and execution/source context, capture the adjacent scheduler/process or clock/source state, change only the demonstrated cause, then repeat the original scheduled or time-sensitive workload and regression checks.Continue to the next unresolved boundary while preserving the original test condition.

Scheduling · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryScheduling
Topic pathScheduling
Runtime stateLinux Scheduling is the operational reference for proving when and under which identity/environment a non-interactive job is expected to run, whether the scheduler actually triggered it, and whether the invoked workload completed with the intended effect.
Fast checks- Record scheduler, owner, exact expression/calendar, timezone, expected trigger time and original workload acceptance test. - Read back effective loaded schedule and eligibility including enablement, daemon/timer state and any persistent/catch-up semantics. - Correlate the trigger window with logs/process evidence, effective identity, environment, working directory, command path and exit/status data. - Change one demonstrated cause, then wait for or deliberately reproduce the scheduled path and verify the original target state plus a regression run.
Verification chainschedule source → scheduler load/enablement → clock + timezone → eligibility/next trigger → execution identity/environment → process start → exit/result → target read-back → workload acceptance Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundaryScheduling is verified only when the exact scheduled path—not merely a manual invocation—is shown to trigger under the intended identity/environment and the original workload result is read back successfully.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?