102-500 practice question 6 of 30
Which of the following crontab entries will execute myscript at 30 minutes past every hour on Sundays?
Full set: 233 questionsThe crontab format consists of five time-and-date fields followed by a command. The fields are: minute, hour, day of month, month, and day of week. To run a script at 30 minutes past every hour, the minute field must be 30 and the hour field must be (or its equivalent, 0-23). To run it only on Sundays, the day of week field must be 0 (or 7). Therefore, 30 0-23 0 myscript correctly specifies execution at 30 minutes past every hour (0 through 23) on every Sunday (0).
A. 0 30 myscript runs at the start of every hour on the 30th day of the month, which is incorrect.
B. 30 6 myscript runs at 30 minutes past every hour on Saturdays (6), not Sundays.
C. 30 0 0 myscript runs only once on Sunday, at 00:30 (30 minutes past midnight), not every hour.
E. 0 0-23 30 myscript runs at the start of every hour on the 30th day of the month.
1. Linux man-pages project. crontab(5) manual page. Section: "DESCRIPTION". It details the five time fields: "minute (0-59), hour (0-23), day of month (1-31), month (1-12), day of week (0-7)".
2. Das, S. (2012). Your UNIX/Linux: The Ultimate Guide. McGraw-Hill. Chapter 11, Section: "Scheduling Jobs: cron and at", pp. 368-370. This section explains the crontab field layout and use of ranges.
3. University of Washington, CSE 391: Systems and Software Tools course materials. "Shell Scripting & Automation". The section on cron explains the syntax min hour dom mon dow command.
Keep practicing
Take the free 102-500 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 102-500 practice questions
- Question 1What output is produced by the following command sequence? echo ‘1 2 3 4 5 6’ | while rea…
- Question 2Which command will set the local machine's timezone to UTC?
- Question 3Which of the following SQL statements will select the fields name and address from the co…
- Question 4Which of the following commands can remove a user from a group?
- Question 5Where are user specific crontabs stored?
- Question 8Which file, when using Sendmail or a similar MTA system, will allow a user to redirect al…
