Signal9Signal9 — home
online
back to labs

systemd Timer: Schedule a Recurring Maintenance Job

MediumRHCSA Prep15-25 min
The brief

Schedule a recurring maintenance job with a systemd timer. Your assignment is in /root/case/assignment.env (TIMER_NAME, ON_CALENDAR, EXEC_COMMAND).

Under /etc/systemd/system/:

1. TIMER_NAME.service — a oneshot service with ExecStart=EXEC_COMMAND.

2. TIMER_NAME.timer — a [Timer] section with OnCalendar=ON_CALENDAR, and an [Install] section with WantedBy=timers.target.

3. Enable the timer (systemctl enable TIMER_NAME.timer) so it starts at boot.

Grading reads the two unit files and the enable symlink (systemd need not be running). See /root/case/brief.txt.

What you'll do
  • Write a oneshot service that runs the command
  • Write a timer that fires it on the assigned calendar
  • Enable the timer so it starts at boot
  • Understand the timer + service unit pairing

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.