A laptop is powered off overnight.
Run daily maintenance after startup when its scheduled time was missed.
Which mechanism is appropriate?
anacron tracks previous runs and can execute overdue day-based jobs after startup on hosts that are not always running.
Detailed explanation
Incorrect. Ordinary cron does not normally catch up jobs missed while powered off.
Incorrect. atq only lists one-time jobs.
Correct. anacron is designed for this intermittent-host behavior.
Incorrect. atrm removes at jobs.
Try it yourself
An example you can run in a temporary verification environment.
anacron --help 2>&1 | sed -n '1,10p'Expected result
anacronの使用方法Key points
- Catch up missed jobs
- Day-based periods
- Run after startup with delay
Notes
- Environment: anacron help / ジョブ実行なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Cron
A scheduler for recurring jobs described by a time-field table.
at
A scheduler for one-time jobs queued for a specified time.
Anacron
A scheduler that can run periodic jobs after a system was unavailable.