XK0-004 · Question #122
A junior systems administrator is creating a cron job. The cron job requirements are as follows: - Run the hello.sh script every hour (24 times in one day). - Run it on Monday only. Given this scenari
The correct answer is A. 0 *** 1 hello.sh. Just as it hits 0 minutes in the day, cron job runs the task. For example, 00:00, 01:00, 02:00 and so on. If it hits 0 minute 24 times, that takes care of every hour in the day. (If not every hour then it would have been *) The 1 in 5th position represent Monday. You can use 1 or
Question
A junior systems administrator is creating a cron job. The cron job requirements are as follows:
- Run the hello.sh script every hour (24 times in one day).
- Run it on Monday only.
Given this scenario, which of the following crontab options should be configured to meet these requirements?
Options
- A0 *** 1 hello.sh
- B0 24 ** Monday hello.sh
- C24 *** Monday hello.sh
- D1 *** 0 hello.sh
How the community answered
(21 responses)- A71% (15)
- B5% (1)
- C14% (3)
- D10% (2)
Explanation
Just as it hits 0 minutes in the day, cron job runs the task. For example, 00:00, 01:00, 02:00 and so on. If it hits 0 minute 24 times, that takes care of every hour in the day. (If not every hour then it would have been *) The 1 in 5th position represent Monday. You can use 1 or mon but not Monday.
Topics
Community Discussion
No community discussion yet for this question.