CompTIA Linux+ (XK0-006) — Question 15
A Linux administrator prepares a backup script named testBack.sh. The backup script must be executed at 3:00 p.m. every Sunday. Which of the following crontab configurations will satisfy this requirement?
Answer options
- A. 0 * * * 15 testBack.sh
- B. */15 * * * 0 testBack.sh
- C. 0 15 * * 0 testBack.sh
- D. * 15 * * 0 testBack.sh
Correct answer: C
Explanation
The correct answer is C, as it specifies '0 15 * * 0', meaning at 15:00 (3 PM) on every Sunday (0). Option A incorrectly uses '15' in the month field instead of the day of the week. Option B schedules the script to run every 15 minutes on Sundays, which does not meet the requirement. Option D attempts to run the script at every minute during the 15th hour on Sundays, which is also incorrect.