更改crontable文件后是否需要重新启动cron ?


当前回答

试试这个centos 7: service crond reload

其他回答

试试这个:sudo cron重载 它适用于我的ubuntu 12.10

在某些情况下,为了启动脚本工作,需要重新启动cron。重新启动cron并没有什么错。

Sudo服务cron重启

我在16.04 VPS数字海洋上也有类似的问题。如果您正在更改crontab,请确保运行

sudo service cron restart 

RHEL/Fedora/CentOS/Scientific Linux用户命令

Start cron service To start the cron service, use: /etc/init.d/crond start OR RHEL/CentOS 5.x/6.x user: service crond start OR RHEL/Centos Linux 7.x user: systemctl start crond.service Stop cron service To stop the cron service, use: /etc/init.d/crond stop OR RHEL/CentOS 5.x/6.x user: service crond stop OR RHEL/Centos Linux 7.x user: systemctl stop crond.service Restart cron service To restart the cron service, use: /etc/init.d/crond restart OR RHEL/CentOS 5.x/6.x user: service crond restart OR RHEL/Centos Linux 7.x user: systemctl restart crond.service

基于Ubuntu/Mint/Debian的Linux发行版命令

启动cron服务 使用:/etc/init.启动cron服务d / cron开始 或sudo /etc/init.d / cron开始 或者sudo service cron start 停止cron服务 使用:/etc/init.停止cron服务d / cron停止 或sudo /etc/init.d / cron停止 或者sudo service cron stop 重启cron服务 使用:/etc/init.重启cron服务d / cron重启 或sudo /etc/init.d / cron重启 或sudo service cron restart

来源:https://www.cyberciti.biz/faq/howto-linux-unix-start-restart-cron/

试试这个centos 7: service crond reload