Restarting cron after changing crontab file?

后端 未结 11 1499
刺人心
刺人心 2020-11-30 16:38

Do I have to restart cron after changing the crontable file?

相关标签:
11条回答
  • 2020-11-30 16:57

    Try this: service crond restart, Hence it's crond not cron.

    0 讨论(0)
  • 2020-11-30 16:59

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

    On CentOS7: sudo systemctl start crond.service

    0 讨论(0)
  • 2020-11-30 17:00

    try this one for centos 7 : service crond reload

    0 讨论(0)
  • 2020-11-30 17:05

    Try this out: sudo cron reload It works for me on ubuntu 12.10

    0 讨论(0)
  • 2020-11-30 17:07

    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
    
    0 讨论(0)
  • 2020-11-30 17:07

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

    sudo service cron restart 
    
    0 讨论(0)
提交回复
热议问题