A systemd job is running only daily instead of every two hou - CompTIA Linux + XK0-005

Question

A systemd job is running only daily instead of every two hours as intended.
What is MOST likely causing the issue?
 

Answers
  1. correct
Explanation

Correct Answer: c. The OnCalendar schedule is incorrect

The most likely reason a systemd job runs daily instead of every two hours is a misconfiguration in the OnCalendar directive within the corresponding timer unit file. This directive defines when the job is triggered. If the syntax specifies a daily schedule instead of every two hours (e.g., daily instead of *-*-* *:00/2), the job will run once a day. Correcting this ensures the timer triggers as intended.

Why the other options are incorrect:

  • a. The checkdiskspace.service is not running:This service might not be running constantly by design. Timer units in systemd trigger a service to run at specified intervals; the service doesn’t need to run continuously. The issue is about timing, not service execution.
  • b. The checkdiskspace.service needs to be enabled: Enabling the .service is not required for it to run via a timer. It’s the .timer unit that must be enabled. A disabled service can still be triggered if its associated timer is properly configured and active.
  • d. The system-daemon services need to be reloaded: Reloading systemd may be useful after changing unit files, but it won’t fix a misconfigured schedule. If OnCalendar is wrong, reloading won’t help — the timer will still follow the incorrect schedule.

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams

View Courses Offered