Last Updated on April 6, 2022 by Admin 3

Ch7 Scheduling Jobs Exam

  1. The daemon associated with the cron utility is called the ___________ daemon.

    • cron 
    • crondaemon 
    • cdaemon 
    • crond
  2. The crontab command can be used to:

    • Create crontab files 
    • All choices are valid 
    • List crontab files 
    • Remove crontab files
  3. System crontab files are generally found in which of the following directories?

    • /root and /etc 
    • /etc/crontab and /etc/cron.d 
    • /var/spool/cron.d and /etc/cron 
    • /etc and /bin
  4. All commands that are run from system crontabs require root privileges.

    True or False?

    • True 
    • False
  5. Commands specified in a crontab file will run only if the root user is logged in.

    True or False?

    • True 
    • False
  6. In the time fields of a crontab file entry, a _________is used to denote a range of values.

    • [] 
    • – 
    • ()
  7. The crontab keyword @reboot implies that the job runs:

    • Once, at startup
    • Every time a user logs in 
    • Each time the crond daemon starts 
    • Once a day
  8. The system administrator wants to create a crontab entry to perform daily backups. Which of the following keywords should be used?

    • @backup 
    • @today
    • Cannot be done 
    • @daily
  9. The system administrator wants to check the status of a database every hour. Which of the following crontab entries will ensure that the script runs every hour (on the hour) from 8AM to 5PM, Monday through Friday?

    • 00 08-17 * * 1-5 /home/appuser/bin/check-db-status 
    • 00 08-17 * * 00 /home/appuser/bin/check-db-status 
    • 00 08-17 * * 5 /home/appuser/bin/check-db-status 
    • 00 08-05 * * 1-5 /home/appuser/bin/check-db-status
  10. Which of the following commands can be used to view the current contents of a crontab file?

    • crontab -l 
    • crontab -r 
    • crontab -v 
    • crontab -p
  11. Which of the following commands can be used to remove all the crontab entries?

    • crontab -v 
    • crontab -l
    • crontab -p 
    • crontab -r
  12. Refer to following cron job entry:

    0 7-17 * * * /home/joe/bin/check-db-status
    • Executes check-db-status at every hour on all days 
    • Executes check-db-status on all days between 7 AM and 5 PM 
    • Executes check-db-status Monday to Friday between 7 AM and 5 PM 
    • Executes check-db-status at every hour on Monday to Friday
  13. How would you schedule a cron job to run every second?

    • By using the keyphrase @second 
    • By putting an entry similar to * * * * * <job>
    •  Create 60 jobs which run every minute 
    • Using a cron job, it is not possible to schedule a job which runs every second
  14. A Linux server, configured for the UTC time zone, is accessed by users from other time zones. The cron jobs scheduled on the server will run: 

    • As per the time zone of location where the server is kept 
    • As per the TZ environment variable setting in the crontab file
    •  As per UTC time zone 
    • As per the time zone of respective users
  15. The crond daemon can be restarted using the command /etc/init.d/crond restart.

    True or False?

    • True
    • False
  16. The system administrator wants to allow certain users to access the crontab command but not others. This can be done by:

    • Add account name(s) to have access in the system crontab file 
    • Selective access is not possible 
    • Managing entries in cron.allow and cron.deny files 
    • Granting them root privileges
  17. A Linux system has entries in both the cron.allow and cron.deny files. Which users, other than root, will have access to the crontab command?

    • Users specified in cron.allow have access to crontab; cron.deny will be ignored 
    • Only root will have access to crontab 
    • All users except those specified in the cron.deny file will have access to crontab 
    • Users specified in cron.allow but not included in cron.deny will have access to crontab
  18. Only 5 out of 100 Linux users in ABCogs Corp need access to crontab. The administrator should:

    • Create cron.deny and add those five users in the file 
    • Create both cron.allow and cron.deny files. Add five users in cron.allow and remaining ninety five in cron.deny 
    • Create cron.deny and add all the users in the file 
    • Create cron.allow and add those five users to the file
  19. The cron scheduler should not be used if the jobs are to be run at regular intervals.

    True or False?

    • True 
    • False
  20. A one-time job needs to be scheduled for a specific time. Which of the following commands is most suitable for the task?

    • batch 
    • systemctl 
    • at 
    • cron
  21. Pam wants to schedule a one-time task using the at command and receive an email once it is complete. Which of the following at command options should she use?

    • -f
    • -m
    • -x
    • -v
  22. After executing the atq command, the following jobs are displayed:

    2 2014-11-22 22:00 a test_user
    3 2014-11-22 20:00 a root
    4 2014-11-22 22:45 a oracle_dba

    Which of the following commands will delete job 2?

    • atrm test_user 
    • atrm 2 
    • test_user should manually delete the entry 
    • at -r 2
  23. The at.allow and at.deny files can be used to control access to:

    • The at command only 
    • The at and the batch commands 
    • All programs used for scheduling 
    • The crontab command
  24. Rose has to schedule a job to accomplish a one-time task. She wants to run the job during off-peak hours only. Which of the following is most suitable to schedule this task?

    • batch 
    • crontab
    •  at 
    • cron
  25. The batch commands are executed only when the system’s load average drops below which of the following by default?

    •  0.8 
    • 1.0 
    • 0.5 
    • 0.2
  26. The default value for load average for running the batch command can be changed using which of the following commands?

    • atd -o 
    • atd -l 
    • atd -n 
    • It cannot be changed
  27. Which of the following is not an advantage of systemd timer units?

    • Dependencies can be configured for jobs. 
    • Jobs are logged by systemd journal for centralized administration. 
    • They can be set to run in a specific environment. 
    • They are available on all legacy systems including BSD Unix.
  28. Realtime timers allow jobs to be executed after an event occurs.

    True or False?

    • True 
    • False
  29. To show all systemd timer units on a system use the following command:

    • systemctl list-units --type=service 
    • systemctl list-timers --all 
    • systemctl list-timers
    • systemctl -d timers --all
  30. Systemd units are controlled by using the systemctl command.

    True or False?

    • True 
    • False
  31. The systemd-run command requires that .timer files are present to run transient jobs.

    True or False?

    •  True 
    • False