Comparison

Cron vs anacron.

Cron assumes your system is always on. Anacron is designed for systems that aren't: laptops, desktops, intermittent servers. If a scheduled time passes while the system is off, cron silently misses it; anacron runs the job at next boot.

The difference in one sentence

Cron schedules by wall-clock time. Anacron schedules by elapsed period.

If you want a job to run "every day at 2 AM," use cron: it'll fire exactly at 2 AM. If you want a job to run "once every day, even if my laptop was off at 2 AM," use anacron: it'll run the job once per 24-hour period whenever the system is up.

Side-by-side comparison

FeatureCronAnacron
GranularityMinuteDay (at minimum)
Specific time of dayYesNo
Catches missed runsNoYes
Needs always-on systemYesNo
FrequencyFrom every-minute to yearlyEvery N days, or @monthly
Configured incrontab -e or /etc/crontab/etc/anacrontab

Anacron syntax

An anacron entry looks nothing like a cron expression. It's period delay name command:

# /etc/anacrontab
# period_in_days  delay_in_minutes  job-identifier  command
1                 5                  daily.backup    /usr/local/bin/backup.sh
7                 10                 weekly.cleanup  /usr/local/bin/cleanup.sh
30                15                 monthly.report  /usr/local/bin/report.sh

Reads as: "Run backup.sh at most once per day, 5 minutes after anacron determines it's due."

How they work together

Where anacron is installed (RHEL and Fedora by default via cronie-anacron, and many desktop installs), the /etc/cron.daily/, /etc/cron.weekly/ and /etc/cron.monthly/ directories are run by anacron, not cron: Debian’s /etc/crontab only runs them itself when anacron is absent: that's why those run even after the laptop has been off all weekend.

Regular crontab entries are handled by cron and will miss runs if the system is off.

When to use cron

  • Always-on servers
  • Jobs that must run at a specific time (3 AM precisely)
  • Sub-daily frequency (every hour, every 5 minutes)
  • Cloud VMs (which never sleep)

When to use anacron

  • Laptops and desktops that sleep or shut down
  • Intermittent servers
  • Jobs where "once per day" matters more than "at 3 AM"
  • Maintenance tasks that should catch up after downtime

The modern alternative: systemd timers

Systemd timers with Persistent=true combine the best of both: cron-style precision with anacron-style catch-up. See our systemd timers guide.