Ch7 Scheduling Jobs Exam
-
The daemon associated with the
cron
utility is called the ___________ daemon.cron
crondaemon
cdaemon
crond
-
The
crontab
command can be used to:- Create crontab files
- All choices are valid
- List crontab files
- Remove crontab files
-
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
- /
-
All commands that are run from system crontabs require root privileges.
True or False?
- True
- False
-
Commands specified in a
crontab
file will run only if the root user is logged in.True or False?
- True
- False
-
In the time fields of a
crontab
file entry, a _________is used to denote a range of values.- []
- –
- /
- ()
-
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
-
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
-
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
-
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
-
Which of the following commands can be used to remove all the
crontab
entries?crontab -v
crontab -l
crontab -p
crontab -r
-
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
- Executes
-
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
- By using the keyphrase
-
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 thecrontab
file - As per UTC time zone
- As per the time zone of respective users
-
The
crond
daemon can be restarted using the command/etc/init.d/crond restart.
True or False?
- True
- False
-
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
andcron.deny
files - Granting them root privileges
- Add account name(s) to have access in the system
-
A Linux system has entries in both the
cron.allow
andcron.deny
files. Which users, other than root, will have access to the crontab command?- Users specified in
cron.allow
have access tocrontab; 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 tocrontab
- Users specified in
cron.allow
but not included incron.deny
will have access tocrontab
- Users specified in
-
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
andcron.deny
files. Add five users incron.allow
and remaining ninety five incron.deny
- Create
cron.deny
and add all the users in the file - Create
cron.allow
and add those five users to the file
- Create
-
The
cron
scheduler should not be used if the jobs are to be run at regular intervals.True or False?
- True
- False
-
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
-
Pam wants to schedule a one-time task using the
at
command and receive an email once it is complete. Which of the followingat
command options should she use?-f
-m
-x
-v
-
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 entryat -r 2
-
The
at.allow
andat.deny
files can be used to control access to:- The
at
command only - The
at
and thebatch
commands - All programs used for scheduling
- The
crontab
command
- The
-
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
-
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
-
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
-
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.
-
Realtime timers allow jobs to be executed after an event occurs.
True or False?
- True
- False
-
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
-
Systemd units are controlled by using the
systemctl
command.True or False?
- True
- False
-
The
systemd-run
command requires that.timer
files are present to run transient jobs.True or False?
- True
- False
Subscribe
0 Comments
Newest