用root用户登录系统
crontab -e #创建计划任务
按i进入输入模式,添加如下行
01 2 * * * reboot #该行表示每天2:01重启机器
59 23 * * * reboot #该行表示每天23:39重启机器