Courseiva

XK0-006 Automation, Orchestration, and Scripting Practice Question

A Linux administrator needs to schedule a recurring backup script to run every Monday at 02:30 using the system-wide cron facility on a systemd-based distribution. Which entry correctly achieves this when placed in /etc/cron.d/backup?

⚠ Common exam trap

The trap here is forgetting that /etc/cron.d entries need an embedded user field, unlike personal crontabs that omit it.

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 * * 1 root /usr/local/bin/backup.sh

System-wide cron files placed in /etc/cron.d require six fields: minute, hour, day of month, month, day of week, and a user, followed by the command. The correct entry uses minute 30, hour 2, wildcards for day of month and month, day of week 1 for Monday, and root as the executing user, producing a weekly Monday 02:30 run.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    30 2 * * 1 root /usr/local/bin/backup.sh

    Why this is correct

    Files in /etc/cron.d use the extended format that includes a user field between the schedule and the command, so this entry runs the script as root at 02:30 every Monday. The five time fields map to minute, hour, day of month, month, and day of week, satisfying the requirement precisely.

  • ✗

    30 2 1 * * root /usr/local/bin/backup.sh

    Why it's wrong here

    This entry sets the day-of-month field to 1 and leaves day-of-week as the wildcard, so the job runs at 02:30 on the first day of each month rather than every Monday. The correct field for weekly Monday execution is the fifth field set to 1, not the third field.

  • ✗

    2 30 * * 1 root /usr/local/bin/backup.sh

    Why it's wrong here

    The minute and hour fields are reversed here. This entry specifies minute 2 and hour 30, but hour values only range from 0 to 23, so the schedule is invalid and the job would never execute. The intended time of 02:30 requires minute 30 and hour 2 in that order.

  • ✗

    30 2 * * 1 /usr/local/bin/backup.sh

    Why it's wrong here

    This entry omits the required user field that /etc/cron.d files expect. Without a username, cron interprets the command field as the user, causing a syntax error or unexpected behavior, so the backup would not run as root on schedule. This format is valid only in a user crontab, not in the system-wide cron.d directory.

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 →

How Courseiva writes practice questions · Editorial policy

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.