更改crontable文件后是否需要重新启动cron ?
当前回答
在CentOS上使用cPanel sudo /etc/init.D /crond重载就是这样。
CentOS7上:sudo systemctl start krand .service
其他回答
No.
从cron手册页:
...然后Cron将检查所有crontab上的修改时间 并重新加载已更改的内容。因此,cron不需要重新启动 当crontab文件被修改时
但如果你只是想确保它完成了,
sudo service cron reload
or
/etc/init.d/cron reload
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
在CentOS上使用cPanel sudo /etc/init.D /crond重载就是这样。
CentOS7上:sudo systemctl start krand .service
Ubuntu 18.04 *使用方式:/etc/init.d / cron{开始|停止状态| |重启|重载|才}