如何在CentOS7中设置计划重启?
如何在Centos7中创建定时重启,我想每天下午4点重启Centos7服务器,请尝试以下命令。它将在午夜重新启动计算机 关机-r 0:00 添加下面的行/etc/crontab也可以做到这一点如何在CentOS7中设置计划重启?,centos,centos7,Centos,Centos7,如何在Centos7中创建定时重启,我想每天下午4点重启Centos7服务器,请尝试以下命令。它将在午夜重新启动计算机 关机-r 0:00 添加下面的行/etc/crontab也可以做到这一点 0***/sbin/shutdown-r现在请尝试下面的命令。它将在午夜重新启动计算机 关机-r 0:00 添加下面的行/etc/crontab也可以做到这一点 0***/sbin/shutdown-r现在打开crontab配置文件 vim /etc/crontab 在crontab中放入以下行 0 1
0***/sbin/shutdown-r现在请尝试下面的命令。它将在午夜重新启动计算机 关机-r 0:00 添加下面的行/etc/crontab也可以做到这一点
0***/sbin/shutdown-r现在打开crontab配置文件
vim /etc/crontab
在crontab中放入以下行
0 16 * * * /usr/sbin/reboot
或
crontab-e
放在上面
0 16 * * * /usr/sbin/reboot
然后重新启动crontab
systemctl restart crond.service
打开crontab配置文件
vim /etc/crontab
在crontab中放入以下行
0 16 * * * /usr/sbin/reboot
或
crontab-e
放在上面
0 16 * * * /usr/sbin/reboot
然后重新启动crontab
systemctl restart crond.service
只需使用
at
或crond
并在reboot
命令中运行脚本。重复:只需使用at
或crond
并在reboot
命令中运行脚本。重复:shutdown命令是一次性重新启动,而crontab则是每晚启动,对吗?shutdown命令是一次性重启,而crontab则是每晚重启,对吗?