702-100 practice question 2 of 15
Which line in a cron job runs myscript once per hour?
Full set: 60 questionsA crontab entry has five time-and-date fields, followed by the command to be run. The fields are, in order: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-7). An asterisk () in a field means "every". The entry 0 specifies the command to run at minute 0 of every () hour, on every day of the month, every month, and every day of the week. This schedule precisely executes the script once per hour, at the beginning of each hour.
A. runs the script every minute of every hour, resulting in 60 executions per hour.
C. 0 runs the script every minute, but only during the single hour of midnight (00:00).
D. o is syntactically invalid. The character 'o' is not a valid value for the day-of-month field.
E. o is syntactically invalid. The character 'o' is not a valid value for the month field.
1. Linux man-pages project. crontab(5) manual page. Section: "DESCRIPTION". This section details the five time fields and the use of the asterisk () wildcard, confirming that 0 executes a command at the top of every hour. Available at: https://man7.org/linux/man-pages/man5/crontab.5.html
2. University of Washington, Paul G. Allen School of Computer Science & Engineering. "CSE 391: System and Software Tools, Lecture 03: Shell Scripting; Cron". Slide 25 provides the example 0 /usr/bin/updatedb and explains it as "run updatedb at the beginning of every hour". Available at: https://courses.cs.washington.edu/courses/cse391/18wi/lectures/03-scripting-cron.pdf
3. The Open Group Base Specifications Issue 7, 2018 edition. IEEE Std 1003.1-2017. crontab utility, Section: "Standard Input". This POSIX standard defines the format of a crontab entry, specifying the five initial fields for time and date. Available at: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html
Keep practicing
Take the free 702-100 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 702-100 practice questions
- Question 1Which command can be used to display the local filesystems that are currently mounted'?
- Question 3Which FreeBSD command updates packages to newer versions'?
- Question 4Assuming a umask of 022, what are the default permissions in octal mode of the newly crea…
- Question 5A file called mybackup is found while investigating a USB pen drive. Which utility can be…
- Question 6Which of the following excerpts is a valid if condition in the Bourne shell?
- Question 7Which of the following lines in /etc/fstab mounts the device /dev/cd0a to /cdrom?
