CompTIA Linux+ (XK0-005) — Question 294
A Linux administrator is configuring crontab and needs to schedule a task to run only on Saturday and Sunday of every week of the year at 9:00 a.m. Which of the following should the administrator use to accomplish this task?
Answer options
- A. 0 9 * * 1-5 root /root/script.sh
- B. 0 9 1 */3 * root /root/script.sh
- C. 0 9 * * 6,0 root /root/script.sh
- D. 0 9 1 * * root /root/script.sh
Correct answer: C
Explanation
The correct answer is C because it specifies that the task should run at 9:00 a.m. on Saturdays (6) and Sundays (0). Option A schedules the task on weekdays, option B runs it on a specific day in the third month, and option D executes it on the first day of each month, none of which meet the requirement for weekend scheduling.