LFCS · Question #113
Which of the following fields are available in both the global /etc/crontab file as well as in user- specific crontab files? (Select TWO correct answers)
The correct answer is B. Minute D. Command. The minute and command fields are common to both the global /etc/crontab file and user-specific crontab files.
Question
Options
- AYear
- BMinute
- CUsername
- DCommand
How the community answered
(30 responses)- A3% (1)
- B93% (28)
- C3% (1)
Why each option
The `minute` and `command` fields are common to both the global `/etc/crontab` file and user-specific crontab files.
The year field is not a standard part of traditional cron schedule syntax, which typically defines schedules based on minute, hour, day of month, month, and day of week.
The minute field, which specifies the minute of the hour (0-59) when the command should run, is a fundamental component of the cron schedule and is present in both global and user crontabs.
The username field is only found in the global `/etc/crontab` to specify the user under which the command should run; user-specific crontabs inherently run as the user who owns them.
The command field, which contains the actual shell command or script to be executed, is the core of any cron job and is thus required in both `/etc/crontab` and individual user crontab files.
Concept tested: Cron job syntax and fields
Source: https://man7.org/linux/man-pages/man5/crontab.5.html
Topics
Community Discussion
No community discussion yet for this question.