Courseiva
mediumDrag & DropObjective-mapped

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.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

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.

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 →

How Courseiva writes practice questions · Editorial policy

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.