Centos 6 x86 minimal定时重启服务器

2015-11-19  本文已影响539人  禾白小三飘

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

  1. 安装cron:yum install vixie-cron
  2. 设置开机启动服务:chkconfig crond on
  1. 启动crond:service crond start
  2. 设置开机启动:vi /etc/crontab,加入:
    30 16 * * * reboot
    设置每周,每月,每天的16点30分执行命令reboot
上一篇 下一篇

猜你喜欢

热点阅读