Tech/OSS/systemd

From lathama
< Tech‎ | OSS
Jump to navigation Jump to search

Config Precedence

  1. /etc/systemd
  2. /run/systemd
  3. /usr/lib/systemd

Timers

A solution for CRON type work in today times.

See timers with
systemctl list-timers --all
Examples from /usr/lib/systemd/system/
apt-daily-upgrade.timer which calls apt-daily-upgrade.service
systemctl edit apt-daily-upgrade.timer
### Anything between here and the comment below will become the new contents of the file

[Timer]
OnCalendar=*-*-* 3:00

### Lines below this comment will be discarded
Which creates /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
systemctl list-timers apt-daily-upgrade.timer
NEXT                        LEFT     LAST                        PASSED       UNIT                    ACTIVATES
Mon 2021-04-19 03:38:32 MDT 18h left Sun 2021-04-18 06:45:27 MDT 2h 32min ago apt-daily-upgrade.timer apt-daily-upgrade.service

1 timers listed.
Pass --all to see loaded but inactive timers, too.