Bird
0
0

You have created a systemd timer unit and its corresponding service, but the timer never activates the service. Which of the following is the most probable cause?

medium📝 Debug Q6 of 15
Linux CLI - Cron and Scheduling
You have created a systemd timer unit and its corresponding service, but the timer never activates the service. Which of the following is the most probable cause?
AThe timer unit file is missing the [Timer] section.
BThe timer unit file name does not match the service unit file name prefix.
CThe service unit file is missing the <code>ExecStart</code> directive.
DThe timer unit is enabled but not started.
Step-by-Step Solution
Solution:
  1. Step 1: Check timer and service unit naming

    Systemd timers activate services with matching base names. For example, backup.timer activates backup.service.
  2. Step 2: Identify mismatch

    If the timer and service names differ, the timer will not trigger the intended service.
  3. Step 3: Other options

    While missing [Timer] or ExecStart cause issues, the most common cause for no activation is name mismatch.
  4. Final Answer:

    The timer unit file name does not match the service unit file name prefix. -> Option B
  5. Quick Check:

    Timer and service names must match [OK]
Quick Trick: Timer and service unit names must match [OK]
Common Mistakes:
  • Assuming enabling timer is enough without starting
  • Ignoring the required [Timer] section
  • Overlooking missing ExecStart in service

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes