美文网首页
Centos 6 x86 minimal定时重启服务器

Centos 6 x86 minimal定时重启服务器

作者: 禾白小三飘 | 来源:发表于2015-11-19 11:31 被阅读539次

貌似默认没有安装cron服务,执行crontab命令提示找不到命令。

  1. 安装cron:yum install vixie-cron
  2. 设置开机启动服务:chkconfig crond on
  • 查看是否成功:chkconfig --list crond
  1. 启动crond:service crond start
  2. 设置开机启动:vi /etc/crontab,加入:
    30 16 * * * reboot
    设置每周,每月,每天的16点30分执行命令reboot

相关文章

网友评论

      本文标题:Centos 6 x86 minimal定时重启服务器

      本文链接:https://www.haomeiwen.com/subject/fejlhttx.html