> crontab -e
0 3 * * * /sbin/reboot
设置凌晨 3 点重启服务器,但未生效
原因是 crontab 程序需重启
> /etc/init.d/crond restart
CentOS 7 使用
service crond restart
systemctl restart crond
以下为测试:


学习日志 LIUGUOFENG
> crontab -e
0 3 * * * /sbin/reboot
设置凌晨 3 点重启服务器,但未生效
原因是 crontab 程序需重启
> /etc/init.d/crond restart
CentOS 7 使用
service crond restart
systemctl restart crond
以下为测试: