我有以下计时器单元:
[Unit]
Description=Timer for Hive management command: process_payments
[Timer]
Unit=hive-manage@process_payments.service
OnCalendar=*:0/20
[Install]
WantedBy=hive.target
当我使用systemctl status hive-manage@process-payments.timer
检查计时器状态时,我在日志中看到以下错误:
● hive-manage@process-payments.timer - Timer for Hive management command: process-payments
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Mar 02 21:28:39 boldidea systemd[1]: hive-manage@process-payments.timer: Timer unit lacks value setting. Refusing.
Mar 02 21:39:06 boldidea systemd[1]: hive-manage@process-payments.timer: Timer unit lacks value setting. Refusing.
Mar 02 21:39:27 boldidea systemd[1]: hive-manage@process-payments.timer: Timer unit lacks value setting. Refusing.
经过一番搜索,大多数人都会收到一条附带的消息,其中提供了有关错误的更多细节,但我没有得到除";定时器单元缺少值设置";。
这个错误没有多大帮助——我不知道任何名为";值";。
原来我有一个叫process-payments
的旧单元,后来它被重命名为process_payments
(下划线而不是连字符(。我在systemctl status
命令中引用了旧名称。