Restarting cron after changing crontab file?

更改crontable文件后,我是否必须重新启动cron?


No.

From the cron man page:

...cron will then examine the modification time on all crontabs and reload those which have changed. Thus cron need not be restarted whenever a crontab file is modified

But if you just want to make sure its done anyway,

sudo service cron reload

or

/etc/init.d/cron reload

On CentOS with cPanel sudo /etc/init.d/crond reload does the trick.

On CentOS7: sudo systemctl start crond.service


I had a similar issue on 16.04 VPS Digital Ocean. If you are changing crontabs, make sure to run

sudo service cron restart 
链接地址: http://www.djcxy.com/p/66342.html

上一篇: Cron作业重命名网页

下一篇: 在更改crontab文件后重新启动cron?