Use anacron to run daily/weekly/monthly maintenance scripts reliably on a machine that isn't powered on continuously (unlike cron)

domain: man7.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Confirm anacron is installed and check /etc/anacrontab, which lists the jobs anacron controls (as opposed to a per-user crontab).
  2. Add a job-description line to /etc/anacrontab specifying the period in days, a delay in minutes, a unique job identifier, and the command to run.
  3. For the common daily/weekly/monthly pattern, point the anacrontab entry at run-parts against the corresponding cron.daily/cron.weekly/cron.monthly directory so every script dropped there gets executed together.
  4. Rely on anacron's own timestamp tracking (it records when each job last ran) so that if the machine was off when a job was due, the job runs soon after the machine is next up instead of being skipped as it would be under plain cron.
  5. Test a new anacrontab entry by checking system logs after the configured delay window, since anacron jobs run after their delay rather than at an exact wall-clock time.

Known gotchas

Related routes

Run a headless Playwright script on a fixed schedule via cron or a systemd timer
playwright.dev · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans