Created
July 19, 2018 14:57
-
-
Save willwhui/1c43eac00b86ae69779dcde604e482d9 to your computer and use it in GitHub Desktop.
linux系统定时重启
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linux系统定时重启 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
打开linux自带的定时任务管理工具(的配置文件):
在文末添加
意思是每天早上4点+5分钟,调用命令
/sbin/shutdown -r
来重启设备。注意:
据说+5必须写。
否则会导致4点钟的时候不停地重启。
因为系统来不及更新当前时间,每次启动之后都会认为现在是4点。
因此,理论上来说,只要能够延迟1秒钟执行重启,都是可行的。