ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 29 - XK0-005 discussion

Report
Export

A Linux administrator would like to use systemd to schedule a job to run every two hours. The administrator creates timer and service definitions and restarts the server to load these new configurations. After the restart, the administrator checks the log file and notices that the job is only running daily. Which of the following is MOST likely causing the issue?

A.
The checkdiskspace.service is not running.
Answers
A.
The checkdiskspace.service is not running.
B.
The checkdiskspace.service needs to be enabled.
Answers
B.
The checkdiskspace.service needs to be enabled.
C.
The OnCalendar schedule is incorrect in the timer definition.
Answers
C.
The OnCalendar schedule is incorrect in the timer definition.
D.
The system-daemon services need to be reloaded.
Answers
D.
The system-daemon services need to be reloaded.
Suggested answer: C

Explanation:

The OnCalendar schedule is incorrect in the timer definition, which is causing the issue. The OnCalendar schedule defines when the timer should trigger the service. The format of the schedule is OnCalendar=<year>-<month>-<day> <hour>:<minute>:<second>. If any of the fields are omitted, they are assumed to be *, which means any value. Therefore, the schedule OnCalendar=*-*-* 00:00:00 means every day at midnight, which is why the job is running daily. To make the job run every two hours, the schedule should be OnCalendar=*-*-* *:00:00/2, which means every hour divisible by 2 at the start of the minute. The other options are incorrect because they are not related to the schedule. The checkdiskspace.service is running, as shown by the output of systemctl status checkdiskspace.service. The checkdiskspace.service is enabled, as shown by the output of systemctl is-enabled checkdiskspace.service. The system-daemon services do not need to be reloaded, as the timer and service definitions are already loaded by the restart. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 14: Managing Processes and Scheduling Tasks, page 437.

asked 02/10/2024
Shafqat Balouch
29 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first