问题原文
原帖链接 · rcv · CC BY-SA 3.0
I have a systemd timer that I would like to run every weekday morning at 5:30am. Here's the .timer file:
[Unit]
Description=My Cool Timer
[Timer]
OnCalendar=Mon-Fri 05:30:00
[Install]
WantedBy=timers.target
I set up this timer last night, and it fired this morning right on schedule. However, checking on its status shows that it's next scheduled firing (LEFT) is 8 hours ago:
boatzart@machine: sudo systemctl list-timers myCoolTimer.timer
NEXT LEFT LAST PASSED UNIT ACTIVATES
Thu 2016-09-01 05:30:00 PDT 8h ago Thu 2016-09-01 05:30:00 PDT 8h ago myCoolTimer.timer myCoolTimer.service
I'm not sure if it matters, but the associated .service file is Type=forking.
How do I get my timer to actually repeat?
已采纳解答
原帖链接 · Michael Hampton · CC BY-SA 3.0
I think you missed this bit of the documentation:
Note that in case the unit to activate is already active at the time the timer elapses it is not restarted, but simply left running.
The timer does nothing at the next scheduled time, because the service is already running.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
