Bird
0
0

You want a systemd timer to run a backup script every Sunday at 2 AM, but only if the system was off at that time. Which timer settings achieve this?

hard📝 Application Q8 of 15
Linux CLI - Cron and Scheduling
You want a systemd timer to run a backup script every Sunday at 2 AM, but only if the system was off at that time. Which timer settings achieve this?
A[Timer] OnCalendar=Sun 02:00:00 WakeSystem=true
B[Timer] OnCalendar=Sun 02:00:00 AccuracySec=1h
C[Timer] OnCalendar=Sun 02:00:00 RemainAfterElapse=true
D[Timer] OnCalendar=Sun 02:00:00 Persistent=true
Step-by-Step Solution
Solution:
  1. Step 1: Understand Persistent=true effect

    Persistent=true makes systemd run missed timer jobs after boot if the system was off at scheduled time.
  2. Step 2: Analyze other options

    AccuracySec controls timer precision, WakeSystem wakes system from suspend, RemainAfterElapse keeps timer active but does not run missed jobs.
  3. Final Answer:

    OnCalendar=Sun 02:00:00 with Persistent=true -> Option D
  4. Quick Check:

    Persistent=true runs missed jobs after downtime [OK]
Quick Trick: Use Persistent=true to run missed timers after downtime [OK]
Common Mistakes:
  • Confusing WakeSystem with Persistent
  • Using AccuracySec to fix missed runs
  • Misunderstanding RemainAfterElapse purpose

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes