XK0-006 Automation, Orchestration, and Scripting Practice Question
A Linux administrator needs a scheduled job on a production server to run the backup script /usr/local/bin/backup.sh every day at 02:30, and the job must run as the root user regardless of who is logged in. Which single entry in /etc/crontab accomplishes this?
⚠ Common exam trap
The trap here is forgetting that /etc/crontab needs a sixth user field while a per-user crontab edited with crontab -e must not contain one.
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
✓
30 2 * * * root /usr/local/bin/backup.sh
System-wide cron entries in /etc/crontab carry an extra user field between the five time/date fields and the command, which is what allows a job to run as root without a login. The schedule fields must be ordered minute, hour, day-of-month, month, day-of-week, so 30 2 * * * is 02:30 and root names the executing account.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
@daily root /usr/local/bin/backup.sh
Why it's wrong here
The @daily nickname expands to midnight (00:00), not 02:30, so the job would run at the wrong time and could collide with other nightly maintenance. It also mixes a nickname with an explicit user field in a way that is not the requested precise schedule, so it fails the stated requirement.
- ✗
2 30 * * * root /usr/local/bin/backup.sh
Why it's wrong here
The first two fields are minute then hour, so this entry means minute 2 of hour 30, which never occurs because hours only range from 0 to 23. Cron silently discards such an impossible schedule, and the backup never runs. The correct order is minute 30, hour 2.
- ✗
30 2 * * * /usr/local/bin/backup.sh root
Why it's wrong here
This entry omits the required user field entirely, so cron interprets /usr/local/bin/backup.sh as the account name and the literal string root as the command to execute. The job fails because no user named backup.sh exists, and even if the account existed, cron would try to run a command called root.
- ✓
30 2 * * * root /usr/local/bin/backup.sh
Why this is correct
The system crontab /etc/crontab uses a six-field format where field five is the user account that runs the command, followed by the command itself. Placing root in that field and the absolute path to backup.sh after it makes the job run daily at 02:30 as root, independent of any interactive login session.
Go deeper
Related to this question
Learn chapter
User and Group Administration
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
Courseiva writes every XK0-006 question from scratch — 781 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
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.