mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-12-23 21:14:30 +01:00
Alan Orth
9e6a2f7559
You can test OnCalendar strings using systemd-analyze calendar, eg: # systemd-analyze calendar '*-*-* 06:00:00,18:00:00' Failed to parse calendar specification '*-*-* 06:00:00,18:00:00': Invalid argument # systemd-analyze calendar '*-*-* 06,18:00:00' Normalized form: *-*-* 06,18:00:00 Next elapse: Wed 2018-09-26 06:00:00 EEST (in UTC): Wed 2018-09-26 03:00:00 UTC From now: 6h left
13 lines
228 B
SYSTEMD
13 lines
228 B
SYSTEMD
[Unit]
|
||
Description=DSpace Statistics Indexer
|
||
|
||
[Timer]
|
||
# twice a day, at 6AM and 6PM
|
||
OnCalendar=*-*-* 06,18:00:00
|
||
# Add a random delay of 0–3600 seconds
|
||
RandomizedDelaySec=3600
|
||
Persistent=true
|
||
|
||
[Install]
|
||
WantedBy=timers.target
|