alpine版本:3.20.2
使用apk add cronie
安装crontab后,一开始定时任务能运行,系统重启后却不能运行。网上搜的方法试了很多都不管用。无奈重新安装一下crontab试试。
apk del cronie
apk add cronie
安装后发现有个提示:
* you have installed the cronie openrc service,
* but the "crond" service is detected as running/enabled.
* if you wish to use cronie, ensure that you remove the "crond"
* service:
* rc-update del crond
* and enable the "cronie" service:
* rc-update add cronie
* keeping cronie installed while using the "crond" service
按照提示执行:
rc-update del crond
rc-update add cronie
重启系统后定时任务恢复正常。(但重启系统这步未测试是否是必须)
最新评论