Drag steps to the numbered slots on the right, or tap a step then tap a slot.
XK0-006 Practice Question: Drag and drop the steps to set up a cron job that…
Drag and drop the steps to set up a cron job that runs a script daily in the correct order.
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
Write the script, then make it executable, then add a crontab entry with daily schedule, then verify with crontab -l
Setting up a cron job correctly involves first writing the script that will be executed, then making it executable with chmod +x, then adding a crontab entry using crontab -e with the correct time specification (e.g., '0 0 * * *' for daily at midnight), and finally verifying the job is listed with crontab -l. This order ensures the script is ready and permissions are set before cron attempts to run it, and verification confirms the entry is valid.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Write the script, then make it executable, then add a crontab entry with daily schedule, then verify with crontab -l
Why this is correct
This is the correct order because the script must exist before making it executable, and the crontab entry requires an executable script. Verification ensures the job is active.
- ✗
Write the script, then add a crontab entry with daily schedule, then make it executable, then verify with crontab -l
Why it's wrong here
This is incorrect because the script must be made executable before the crontab entry is added; otherwise, cron will fail to run the script due to permission issues.
- ✗
Make the script executable, then write the script, then add a crontab entry, then verify with crontab -l
Why it's wrong here
This is incorrect because you cannot make a script executable before it exists; you must write it first.
- ✗
Add a crontab entry with daily schedule, then write the script, then make it executable, then verify with crontab -l
Why it's wrong here
This is incorrect because the crontab entry references a script that does not exist yet, and the script must be written and made executable before the cron job can run it.
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
chmod
chmod is a command in Linux and Unix-like operating systems used to change the permissions (read, write, execute) of a file or directory.
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 — 979 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 →
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.