Cron vs anacron: which scheduler for laptops and servers that don't run 24/7?
Use cron for always-on servers that need precise scheduling. Use anacron for laptops, desktops, and any machine that might be powered off at the scheduled time. On a typical Linux desktop, both run side by side and the combination covers all scheduling needs.
Cron assumes your machine runs 24/7. If the server is off at the scheduled time, the job is skipped. Anacron is designed for machines that don't run continuously: it tracks when each job last ran and executes missed jobs after boot. If your workload includes laptops, development VMs, or spot instances, anacron is the right tool.
By TechCompare · Updated
How this is calculated
Anacron schedules are defined in days, not minutes. You can say 'run this job daily' or 'run this weekly' but not 'run at 2:15 AM.' Anacron runs jobs in sequence after a configurable delay from boot. On a server that runs 24/7, cron is better because it gives you precise wall-clock timing. On a laptop that sleeps overnight, anacron ensures the daily backup actually happens when you open the lid in the morning. Modern Linux distributions typically run both: cron handles minute-level precision for always-on jobs, and anacron catches up daily/weekly/monthly maintenance tasks.
Verdict
The dividing line is whether the machine stays on. Anacron works in day units only, no minute or hour fields, and runs queued jobs in sequence after a boot delay. A laptop that sleeps overnight misses the cron slot entirely, but anacron catches the daily backup when you lift the lid. Mainstream distros run both, so minute-level cron and day-level anacron maintenance cover the full range.
More Cron scenarios
Related guides
Frequently asked questions
What's the difference between cron and anacron?
Why did my cron job not run on my laptop overnight?
Can cron and anacron run side by side on the same machine?
Related tools
Unix Timestamp
Convert between Unix timestamps and human-readable dates.
Use tool ➜CHMOD Configurator
Calculate Linux file permissions using checkboxes, octal numbers, or symbolic notation.
Use tool ➜Text Encoding Converter
Convert between Text, Base64, Binary, Hexadecimal, and Decimal formats.
Use tool ➜