A system administrator created a timer unit named backup.timer in /etc/systemd/system with the following sections:
[Unit]
Description=Run backup script after boot
[Timer]
OnBootSec=5min
[Install]
WantedBy=multi-user.target
After running systemctl daemon-reload, enabling backup.timer, and rebooting, the backup.service did not run 5 minutes after boot. What modification ensures the timer starts and triggers as intended?
Specifying WantedBy=timers.target in the [Install] section links the timer unit into the correct target for timer activation. The multi-user.target is not processed by the timer management system. Adding Persistent=true only affects missed events, not initial activation. DefaultDependencies=no breaks essential ordering and dependency logic. Leaving WantedBy as multi-user.target registers the unit in the wrong target.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the role of the [Unit] section in a systemd timer unit?
Open an interactive chat with Bash
What does the timers.target do in systemd?
Open an interactive chat with Bash
What is the purpose of the Persistent=true setting in a timer unit?