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
Confirm anacron is installed and check /etc/anacrontab, which lists the jobs anacron controls (as opposed to a per-user crontab).
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.
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.
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.
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
anacron jobs run after a configured delay (in minutes) once the system is up, not at a specific time of day, so it isn't a drop-in replacement where exact scheduling time matters — use cron or a systemd timer for that.
anacron only guarantees day-level granularity (periods are specified in whole days), so it isn't suitable for jobs that need to run more than once per day.
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?