As explained in GoAccess 1.4 detailed tutorial, I've create a goa-daily.timer
[Unit]
Description=Daily update of GoAccess reports
[Timer]
# Every day @ 3 O'clock
OnCalendar=*-*-* 03:00:00
RandomizedDelaySec=7200
Persistent=true
Unit=goa-daily.service
[Install]
WantedBy=timers.target
No matter how I define the OnCalendar
option, when I check the timer status it has always a Trigger: n/a
whereas all other timers have a trigger.
root@scw:/etc/systemd/system/timers.target.wants# ll
total 0
lrwxrwxrwx 1 root root 35 sep 28 2020 apt-daily.timer -> /lib/systemd/system/apt-daily.timer
lrwxrwxrwx 1 root root 43 sep 28 2020 apt-daily-upgrade.timer -> /lib/systemd/system/apt-daily-upgrade.timer
lrwxrwxrwx 1 root root 33 nov 30 2020 certbot.timer -> /lib/systemd/system/certbot.timer
lrwxrwxrwx 1 root root 35 fév 23 23:01 goa-daily.timer -> /etc/systemd/system/goa-daily.timer
lrwxrwxrwx 1 root root 35 sep 28 2020 logrotate.timer -> /lib/systemd/system/logrotate.timer
lrwxrwxrwx 1 root root 32 sep 28 2020 man-db.timer -> /lib/systemd/system/man-db.timer
root@scw:/etc/systemd/system/timers.target.wants# systemctl status goa-daily.timer
● goa-daily.timer - Daily update of GoAccess reports
Loaded: loaded (/etc/systemd/system/goa-daily.timer; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-01-31 15:43:42 UTC; 3 weeks 2 days ago
Trigger: n/a
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@scw:/etc/systemd/system/timers.target.wants# systemctl status logrotate.timer
● logrotate.timer - Daily rotation of log files
Loaded: loaded (/lib/systemd/system/logrotate.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Tue 2022-01-04 08:00:34 UTC; 1 months 20 days ago
Trigger: Thu 2022-02-24 00:00:00 UTC; 49min left
Docs: man:logrotate(8)
man:logrotate.conf(5)
Why my timer does not display any trigger?
I've enabled it with: systemctl enable --now goa-daily.timer
What else should I do to have running timer with a trigger?
I'm on Debian 10 (buster)
Status of goa-daily.service
# systemctl status goa-daily.service
● goa-daily.service - Application
Loaded: loaded (/etc/systemd/system/goa-daily.service; enabled; vendor preset: enabled)
Active: active (exited) since Mon 2022-01-31 16:08:54 UTC; 3 weeks 2 days ago
Main PID: 17337 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 2347)
Memory: 0B
CGroup: /system.slice/goa-daily.service
Thanks to @fuzzy drawings comment, I notice that daemon-reload
has no effect on timer change. stop
and start
the timer adds the trigger!
# systemctl stop goa-daily.timer
# systemctl start goa-daily.timer
# systemctl status goa-daily.timer
● goa-daily.timer - Daily update of GoAccess reports
Loaded: loaded (/etc/systemd/system/goa-daily.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Thu 2022-02-24 08:51:34 UTC; 4s ago
Trigger: Thu 2022-02-24 08:54:00 UTC; 2min 21s left
BUT after running the timer, status displays a n/a Trigger, at least with a OnCalendar date-time definition like OnCalendar=*-*-* 08:54:00
.
# systemctl status goa-daily.timer
● goa-daily.timer - Daily update of GoAccess reports
Loaded: loaded (/etc/systemd/system/goa-daily.timer; enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-02-24 08:51:34 UTC; 2min 30s ago
Trigger: n/a
What I'm missing to make it repeating each day??? I'll test with daily option and check tomorrow...
systemctl start goa-daily.timer
?systemctl status goa-daily.service
return? Add to your question, please.