实用技巧:Linux操作系统定时关机或重启

摘自: linux.ccidnet.com  被阅读次数: 160


yangyi 于 2008-01-14 22:20:33 提供


修改 #vi /etc/crontab

SHELL=/bin/bash

PATH=/sbin:/bin:/usr/sbin:/usr/bin

MAILTO=root

HOME=/

# run-parts

30 1 * * * root init 6 //凌晨1点30分重启init 0 关机

01 * * * * root run-parts /etc/cron.hourly

02 4 * * * root run-parts /etc/cron.daily

22 4 * * 0 root run-parts /etc/cron.weekly

42 4 1 * * root run-parts /etc/cron.monthly

重启crond任务

/sbin/service crond start //启动服务

/sbin/service crond stop //关闭服务

/sbin/service crond restart //重启服务

/sbin/service crond reload //重新载入配置

原文链接: http://tech.ccidnet.com/art/302/20071210/1303359_1.html