Chinaunix
标题:
伪服务器,定时开机与定时关机
[打印本页]
作者:
blworld
时间:
2008-10-12 12:08
标题:
伪服务器,定时开机与定时关机
伪服务器:用一PC来充当File Server,所以24小时开机比较危险。
1.定时开机:
BIOS->Power Management->Power by Alarm
2.定时关机:
Linux->
1、先用vi编辑器建立一个文件,如auto_halt.txt
#vi /root/auto_halt.txt
输入如下内容:
30 17 * * * halt -p
退出保存:wq!
(以上例子是下午17点30分关机挂起)
2、执行crontab命令:
编辑/etc/init.d/rc.local, 加入
crontab /root/auto_halt.txt
3,要检查下自动执行定时任务的服务有没有开启,如没有,要开启
本文来自ChinaUnix博客,如果查看原文请点:
http://blog.chinaunix.net/u/28781/showart_1286896.html
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2