这是我的计时器:
[Unit]
Description=Do whatever
[Timer]
OnCalendar=daily UTC
[Install]
WantedBy=timers.target
Run Code Online (Sandbox Code Playgroud)
它无法启动并出现以下错误:
Failed to start mytimer.timer: Unit mytimer.timer failed to load: Invalid argument. See system logs and 'systemctl status mytimer.timer' for details.
Run Code Online (Sandbox Code Playgroud)
遗憾的是,systemctl status错误消息没有任何清晰度
但是,如果我删除 UTC 文字,它就可以正常工作:
[Unit]
Description=Do whatever
[Timer]
OnCalendar=daily
[Install]
WantedBy=timers.target
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
该文档描述了 接受的格式OnCalendar,并且表明可以使用UTC。
是的,我尝试使用引号 - 没有帮助。我也尝试使用标准化形式 - 同样的事情
版本: