Linux Foundation Certified System Administrator (LFCS) — Question 92
Which of the following crontab entries will execute myscript at 30 minutes past every hour on Sundays?
Answer options
- A. 0 * * * 30 myscript
- B. 30 * * * 6 myscript
- C. 30 0 * * 0 myscript
- D. 30 0-23 * * 0 myscript
- E. 0 0-23 * * 30 myscript
Correct answer: B
Explanation
The correct answer, B, specifies that myscript will run at the 30th minute of every hour on Sunday (6 represents Sunday in crontab). Option A incorrectly sets the minute and day, C runs at midnight on Sunday, D allows for execution all day on Sunday but does not specify the correct minute, and E incorrectly sets the day to the 30th of the month.