Services and User Management

An administrator wants a script to run every night at 02:00 on a systemd-based server, replacing an old cron entry. The job is defined in backup.service. Which additional unit file should the administrator create so that systemd starts backup.service on that schedule?

Show the answer

Correct answerB. backup.timer containing an OnCalendar= directive

A timer unit with OnCalendar= triggers its matching service at scheduled times, which replaces a cron entry. A path unit only reacts to filesystem changes, not to the clock, so it cannot run a job at 02:00.