我创建了一个 systemd-timer ,它应该每天重新启动 docker 容器,但它从来没有这样做。 docker 容器的正常运行时间 > 1 天,这表明容器没有重新启动
/lib/systemd/system/rocketchat-restart.timer
[Unit]
Description=timer to restart rocketchat docker container
[Timer]
OnCalendar=*-*-* 04:45:00
Unit=rocketchat-restart.service
Persistent=true
[Install]
WantedBy=multi-user.target
/lib/systemd/system/rocketchat-restart.service
[Unit]
Description=service to restart rocketchat docker container
[Service]
Type=oneshot
ExecStart=/usr/bin/docker container restart rocketchat
systemctl 状态 Rocketchat-restart.timer
* rocketchat-restart.timer - timer to restart rocketchat docker container
Loaded: loaded (/lib/systemd/system/rocketchat-restart.timer; enabled; preset: enabled)
Active: active (waiting) since Fri 2023-06-30 10:57:25 UTC; 1 week 3 days ago
Until: Fri 2023-06-30 10:57:25 UTC; 1 week 3 days ago
Trigger: Wed 2023-07-12 04:45:00 UTC; 20h left
Triggers: * rocketchat-restart.service
Jun 30 10:57:25 docker systemd[1]: Started rocketchat-restart.timer - timer to restart rocketchat docker container.
systemctl 状态 Rocketchat-restart.service
* rocketchat-restart.service - service to restart rocketchat docker container
Loaded: loaded (/lib/systemd/system/rocketchat-restart.service; static)
Active: inactive (dead) since Wed 2023-07-12 04:45:12 UTC; 6h ago
TriggeredBy: * rocketchat-restart.timer
Process: 1794734 ExecStart=/usr/bin/docker container restart rocketchat (code=exited, status=0/SUC>
Main PID: 1794734 (code=exited, status=0/SUCCESS)
CPU: 41ms
Jul 12 04:45:01 docker systemd[1]: Starting rocketchat-restart.service - service to restart rocketchat>
Jul 12 04:45:12 docker docker[1794734]: rocketchat
Jul 12 04:45:12 docker systemd[1]: rocketchat-restart.service: Deactivated successfully.
Jul 12 04:45:12 docker systemd[1]: Finished rocketchat-restart.service - service to restart rocketchat>
systemctl 列表定时器 | grep Rocketchat-restart.timer
NEXT LEFT LAST PASSED UNIT ACTIVAT
Wed 2023-07-12 04:45:00 UTC 20h left Tue 2023-07-11 04:45:01 UTC 3h 49min ago rocketchat-restart.timer rocketchat-restart.service
我的服务有问题吗?
为什么显示积极的:和直到:同一日期?
什么是直到:意思是?
这里有什么问题吗?