CompTIA Linux+ (XK0-004) — Question 273
An administrator wants to run a script on the second Monday of every month. The script should be executed at 7:00 a.m. and 1:00 p.m. Which of the following entries to the crontab will accomplish this?
Answer options
- A. 0 7,13 7-13 * 1 script.go
- B. 0 7-13 2 * 1 script.go
- C. 0 7-13 7,13 2 * script.go
- D. 0 7,13 2 * 1 script.go
Correct answer: A
Explanation
The correct answer is A because it specifies that the script should run at 7:00 a.m. and 1:00 p.m. (0 7,13) on the second Monday of the month. Option B incorrectly uses '2' which refers to the day of the month, and options C and D do not correctly target the second Monday, as they either misplace the day of the week or the time settings.