Which of the following statements is true regarding systemd timer units?
Which of the following statements is true regarding systemd timer units?
Systemd timer units are designed to control the execution of service units. Each timer unit is associated with a specific service unit and is responsible for activating that service at the configured times. Timer units are identified by the '.timer' suffix and, when triggered, they activate a service with the same name, except for the suffix. This makes statement E correct, as it accurately describes the relationship between systemd timer units and service units.
A. Timer units can only be defined within a service unit's file. => wrong, each timer unit file interacts with a specific services. ls /etc/systemd/system/timers.target.wants/ B. The command executed by the timer is specified in the timer unit's [Cmd] section. => wrong [Timer] is correct. (cat /etc/systemd/system/timers.target.wants/*.timers) C. A dedicated system service, systemd-cron, handles the execution of timer units. => Timers have built-in support for calendar time events, monotonic time events, and can be run asynchronously. Timers can be used as an alternative to cron. D. Timer units only exist in the system scope and are not available for users. => wrong, it's available for user. E. Each systemd timer unit controls a specific systemd service unit. => correct. each timer unit file interacts with a specific services.
In systemd, timer units are used to schedule and control the execution of service units at specific times. Each timer unit is associated with a specific service unit and is configured to control its execution.
E is correct "Timers are systemd unit files identified by the .timer suffix, and for each of these there must be a corresponding unit file which describes the unit to be activated when the timer elapses. By default, a timer activates a service with the same name, except for the suffix." source: LPIC-1 (102) (Version 5.0), page 206