easyMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A junior administrator is asked to automate the…
A junior administrator is asked to automate the backup of a configuration file every night at 11 PM. The script /usr/local/bin/backup.sh already exists. Which command should the administrator run to schedule this task?
⚠ Common exam trap
A common mix-up: candidates confuse `at` (for one-time tasks) with `cron` (for recurring tasks), or assume `systemctl start` can create a timer on the fly without a pre-existing timer unit file.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
echo "0 23 * * * /usr/local/bin/backup.sh" | crontab -
The `crontab -` command reads from standard input and installs the cron job. The line `0 23 * * * /usr/local/bin/backup.sh` specifies that the script should run at 23:00 (11 PM) every day, matching the requirement exactly. This is the standard method for scheduling recurring tasks in Linux using cron.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
systemctl start backup.timer
Why it's wrong here
This starts a systemd timer unit named backup.timer, which does not exist by default and would require prior setup.
- ✗
at 23:00 /usr/local/bin/backup.sh
Why it's wrong here
The at command schedules a one-time execution, not recurring daily.
- ✓
echo "0 23 * * * /usr/local/bin/backup.sh" | crontab -
Why this is correct
Correct. This appends a cron job entry to the crontab, scheduling the script to run daily at 23:00.
- ✗
nohup /usr/local/bin/backup.sh &
Why it's wrong here
This runs the script immediately in the background with nohup, not scheduling it for later.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
crontab
Crontab is a time-based job scheduler in Unix-like operating systems that allows users to automate the execution of scripts or commands at specified intervals.
Key term
cron
Cron is a time-based job scheduler in Unix-like operating systems that automatically runs commands or scripts at specified dates and times.
About these practice questions
One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.