Services and User Management

A laptop is usually powered off overnight. Which way of scheduling a daily maintenance job makes it still run after the next boot when its period has passed?

Show the answer

Correct answerA. A job entry in /etc/anacrontab

AWhy this is right: anacron records when each job last ran and runs overdue jobs after boot.

BWhy not this: cron runs jobs only at their set times and skips runs missed while the machine was off.

CWhy not this: An at job runs once at a set time and does not repeat daily.

DWhy not this: Without Persistent=true, a systemd timer does not run a job missed while the machine was off.

anacron records the last run date of each job in timestamp files and runs overdue jobs after boot, which suits systems that are not always on. Cron does not catch up on missed runs when the machine was off at the scheduled time, and a systemd timer catches up only when Persistent=true is set.