XK0-006 System Management Practice Question
A Linux administrator needs to schedule a backup script to run every day at 2:30 AM. Which TWO of the following methods can be used to achieve this? (Choose two.)
⚠ Common exam trap
The trap here is thinking that placing a script in /etc/cron.daily/ can control the exact execution time, but it cannot; the time is set by system crontab.
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
✓
Create a cron job with the schedule '30 2 * * *' in the root crontab.
Both cron and systemd timers are valid methods for scheduling recurring tasks at specific times. A cron job with the schedule '30 2 * * *' runs daily at 2:30 AM. A systemd timer with OnCalendar=*-*-* 02:30:00 also triggers daily at that time when enabled. These are the two correct approaches among the options.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create a systemd service with Restart=always and RestartSec=86400.
Why it's wrong here
Using Restart=always with RestartSec=86400 would restart the service every 86400 seconds (24 hours) after it exits, but the initial start time is not controlled. This does not guarantee the backup runs at 2:30 AM; it would depend on when the service first started. This method is unreliable for scheduling at a specific time.
- ✗
Use the 'at' command to schedule the script with 'at 02:30' and repeat it daily.
Why it's wrong here
The 'at' command is designed for one-time execution, not recurring tasks. While you could schedule a job at 2:30 AM, it would run only once. To repeat daily, you would need to manually reschedule or use a loop, which is not the intended use of 'at'. It is not a suitable method for daily recurring backups.
- ✓
Create a cron job with the schedule '30 2 * * *' in the root crontab.
Why this is correct
A cron job with the schedule '30 2 * * *' will run the command every day at 2:30 AM. The fields represent minute, hour, day of month, month, and day of week. This is a standard and reliable method for scheduling recurring tasks on Linux. It is directly supported by the cron daemon and is easy to set up.
- ✗
Add the script to /etc/cron.daily/ with a filename that starts with '02:30'.
Why it's wrong here
The /etc/cron.daily/ directory is used by run-parts to execute scripts daily, but the execution time is typically controlled by /etc/crontab and is usually in the early morning, not at a specific time like 2:30 AM. The filename does not determine the execution time; run-parts ignores filenames for scheduling. This method does not guarantee execution at 2:30 AM.
- ✓
Create a systemd timer unit with OnCalendar=*-*-* 02:30:00 and enable it.
Why this is correct
Systemd timer units can be used to schedule tasks with calendar events. Setting OnCalendar=*-*-* 02:30:00 will trigger the timer every day at 2:30 AM. When enabled, the timer activates the associated service unit. This is a modern alternative to cron and is fully supported on systemd-based systems.
Go deeper
Related to this question
Learn chapter
Installing Linux and Package Management
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.
Key term
systemd
systemd is a system and service manager for Linux operating systems that initializes and manages processes, services, and system resources after the kernel boots.
About these practice questions
This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.