GSEC · Question #329
Analyze the file below. When will the program /home/sink/utils/remove temp hies.py run?
The correct answer is D. At the time specified in the crontab file. The program is scheduled by a crontab file, which defines exact date and time patterns for automated execution by the cron daemon.
Question
Analyze the file below. When will the program /home/sink/utils/remove temp hies.py run?
Exhibit
Options
- AWhen a user requests it by connecting to the listening port
- BWhen the user 'sink' logs in
- CAt startup when the system enters the multi-user runlevel
- DAt the time specified in the crontab file
How the community answered
(41 responses)- A17% (7)
- B7% (3)
- C5% (2)
- D71% (29)
Why each option
The program is scheduled by a crontab file, which defines exact date and time patterns for automated execution by the cron daemon.
A program that runs when a client connects to a listening port is managed by a service daemon such as inetd or xinetd, not cron.
Scripts that execute when a specific user logs in are placed in login initialization files like ~/.bash_profile or ~/.profile, not crontab.
Programs that run at multi-user runlevel startup are configured as systemd unit files or SysV init scripts in /etc/init.d, not cron jobs.
Crontab is the Linux/Unix time-based job scheduler. The referenced file contains cron syntax specifying when the script should run - the cron daemon reads this file and triggers the program at the defined time expression (minute, hour, day, month, weekday fields), making scheduled time the determining factor for execution.
Concept tested: Linux cron job scheduling and crontab syntax
Source: https://man7.org/linux/man-pages/man5/crontab.5.html
Topics
Community Discussion
No community discussion yet for this question.
