Courseiva
Service Configuration →hardMultiple Choice

LFCS Service Configuration Practice Question

A Linux administrator is creating a custom systemd timer unit named backup.timer to schedule a daily backup script. The administrator wants the timer to trigger the backup service exactly at 2:00 AM every day, regardless of when the system was last booted. Which timer directive should be used in the [Timer] section of backup.timer?

⚠ Common exam trap

The trap here is selecting a monotonic timer directive like OnBootSec, which seems to schedule a daily event but actually depends on boot time and will drift if the system is rebooted at different times.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

OnCalendar=*-*-* 02:00:00

To schedule a task at a specific time of day, such as 2:00 AM daily, the OnCalendar directive is used with a calendar expression. The expression *-*-* 02:00:00 matches every day at 2:00 AM. Other timer directives like OnBootSec, OnStartupSec, and OnUnitActiveSec are monotonic and relative to events like boot or last activation, so they cannot guarantee a fixed wall-clock time. Therefore, OnCalendar is the correct choice for this scenario.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    OnStartupSec=2h

    Why it's wrong here

    OnStartupSec is similar to OnBootSec but relative to when systemd was first started, not the system boot. It would trigger 2 hours after systemd started, which is not at 2:00 AM. This directive is typically used for early boot tasks and does not provide calendar-based scheduling.

  • ✓

    OnCalendar=*-*-* 02:00:00

    Why this is correct

    The OnCalendar directive defines a calendar-based schedule using systemd's calendar event format. Specifying *-*-* 02:00:00 means every day at 2:00 AM. This is independent of boot time and ensures the timer triggers at the exact wall-clock time. This is the correct directive for the scenario.

  • ✗

    OnUnitActiveSec=24h

    Why it's wrong here

    OnUnitActiveSec triggers the timer relative to when the unit was last activated. It would run every 24 hours after the last activation, but not necessarily at 2:00 AM. The start time would drift based on when the service last ran. This does not meet the requirement of a fixed daily time.

  • ✗

    OnBootSec=2h

    Why it's wrong here

    OnBootSec specifies a delay relative to system boot. It would trigger the service 2 hours after boot, not at 2:00 AM. This is a monotonic timer and does not align with a specific time of day. It is used for tasks that should run after a certain uptime, not for daily scheduled backups at a fixed time.

About these practice questions

Courseiva writes every LFCS question from scratch — 406 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Linux Foundation exam blueprint

This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.