A system administrator is responsible for a server that is powered off for maintenance every weekend. A critical script must run once per day to archive log files. The administrator observes that when the maintenance window overlaps with the script's scheduled time, the script does not run until the next scheduled day. Which utility should the administrator use to ensure the script runs once daily, even if the scheduled time is missed due to the server being offline?
The correct answer is anacron. anacron is a job scheduler designed specifically for systems that are not running 24/7. It checks whether a job's scheduled period (e.g., daily, weekly) has passed since its last execution and runs any missed jobs when the system is next started. The cron utility, managed via crontab, is incorrect because it assumes the system is always running; if the system is off at the precise scheduled time, the job is skipped entirely. The at command is incorrect because it is used for scheduling tasks to run only once at a future time, not for recurring daily jobs. The nohup command is also incorrect; its purpose is to allow a command to continue running even if the user logs out, but it does not schedule jobs.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
How does Anacron differ from Cron?
Open an interactive chat with Bash
Can Anacron schedule jobs with minute-level precision?
Open an interactive chat with Bash
How can I configure Anacron to ensure a daily script runs?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access