Recall & Review
beginner
What is a systemd timer?
A systemd timer is a tool in Linux that schedules tasks to run automatically at specific times or intervals, similar to a clock alarm for scripts or commands.
Click to reveal answer
beginner
Which two files are needed to create a systemd timer?
You need a
.service file that defines the task to run, and a .timer file that schedules when the task runs.Click to reveal answer
beginner
How do you start and enable a systemd timer named
backup.timer?Use
sudo systemctl start backup.timer to start it now, and sudo systemctl enable backup.timer to make it start automatically on boot.Click to reveal answer
intermediate
What does the
OnCalendar= setting do in a systemd timer file?It sets the schedule for when the timer triggers, using calendar events like daily, weekly, or specific dates and times.
Click to reveal answer
beginner
How can you check the status and last run time of a systemd timer?
Run
systemctl status yourtimer.timer to see if it is active and when it last triggered.Click to reveal answer
What file extension does a systemd timer unit use?
✗ Incorrect
Systemd timer units always use the .timer extension.
Which command starts a systemd timer immediately?
✗ Incorrect
You start the timer unit with 'systemctl start timer.timer'.
What does the
OnBootSec= option do in a timer file?✗ Incorrect
OnBootSec= schedules the task to run after a delay from system boot.
If you want a task to run every 10 minutes, which timer setting is best?
✗ Incorrect
OnUnitActiveSec=10min triggers the task 10 minutes after the last run.
How do you check when a systemd timer last triggered?
✗ Incorrect
The status command on the timer unit shows last trigger time.
Explain how to create and enable a systemd timer to run a backup script every day at 2 AM.
Think about two files and scheduling with OnCalendar.
You got /4 concepts.
Describe how systemd timers differ from cron jobs and one advantage of using timers.
Focus on management and features differences.
You got /4 concepts.