我的计时器在 CentOS7 上被系统拒绝:
$ journalctl -u synchro_ADN_To_Scality.timer --no-pager | sed 's/^.*systemd.1.: //' | sort -u
-- Logs begin at Thu 2023-04-06 10:25:28 CEST, end at Thu 2023-05-25 12:29:08 CEST. --
synchro_ADN_To_Scality.timer lacks value setting. Refusing.
[/usr/local/lib/systemd/system/synchro_ADN_To_Scality.timer:4] Failed to parse calendar specification, ignoring: Mon..Sat *-*-* 18:00:00
$ systemctl cat synchro_ADN_To_Scality.timer
# /usr/local/lib/systemd/system/synchro_ADN_To_Scality.timer
[Unit]
Description=Lancement quotidien de la Synchro des Synology ADN vers le Ring Scality
[Timer]
OnCalendar=Mon..Sat *-*-* 18:00:00
[Install]
WantedBy=timers.target
我在手册中看不到日期范围systemd.time
:
$ man systemd.time | grep -F ".."
$
CentOS7 不识别日期范围吗?
此功能是在 systemd 版本 231 中添加的: