Given a unit file foo.service
# /etc/systemd/system/foo.service [Service] ExecStart=/opt/bin/foo --prod
And a unit file foo.timer
# /etc/systemd/system/foo.timer [Timer] OnCalendar=*-*-* 12:00:00 [Install] WantedBy=timers.target
- What happens at 12:00 every day if foo.service is off? (it will probably be started)
- What happens at 12:00 every day if foo.service is already on? (will it be restarted?)
From reading man systemd.timer
For each timer file, a matching unit file must exist, describing the unit to activate when the timer elapses. By default, a service by the same name as the timer (except for the suffix) is activated. Example: a timer file foo.timer activates a matching service foo.service. The unit to activate may be controlled by Unit= (see below).
- What does it mean to activate foo.service? Does it mean restart or verify that it's already started?