<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>成刚网志 &amp;amp;&amp;amp; CBolg Application</title>
<link>http://www.chenggang.net</link>
<description><![CDATA[记录我的网事历程，架起沟通的桥梁！欢迎留言！
]]></description>
<lastBuildDate>Sun, 20 May 2012 22:43:39 +0800</lastBuildDate>
<copyright>Copyright &amp;copy; 2012 by CBolg Application.</copyright>
<language>zh-cn</language>
<pubDate>Mon, 21 May 2012 14:47:24 +0800</pubDate>
<item>
<title>Linux自动关机设置</title>
<summary><![CDATA[<p>因为内部测试服务器每天下班都得关机，有时候忘了就直接断电了，时间长了怕系统弄坏了，重新配置有麻烦，就找了这一招。</p><p>vi /etc/crontab</p><p style="text-indent: 2em">SHELL=/bin/bash</p><p style="text-indent: 2em">PATH=/sbin:/bin:/usr/sbin:/usr/bin</p><p style="text-indent: 2em">MAILTO=root</p><p style="text]]></summary>
<description><![CDATA[<p>因为内部测试服务器每天下班都得关机，有时候忘了就直接断电了，时间长了怕系统弄坏了，重新配置有麻烦，就找了这一招。</p><p>vi /etc/crontab</p><p style="text-indent: 2em">SHELL=/bin/bash</p><p style="text-indent: 2em">PATH=/sbin:/bin:/usr/sbin:/usr/bin</p><p style="text-indent: 2em">MAILTO=root</p><p style="text-indent: 2em">HOME=/</p><p style="text-indent: 2em"></p><p style="text-indent: 2em"># run-parts</p><p style="text-indent: 2em"></p><p style="text-indent: 2em">01 * * * * root run-parts /etc/cron.hourly</p><p style="text-indent: 2em">02 4 * * * root run-parts /etc/cron.daily</p><p style="text-indent: 2em">22 4 * * 0 root run-parts /etc/cron.weekly</p><p style="text-indent: 2em">42 4 1 * * root run-parts /etc/cron.monthly</p><p style="text-indent: 2em"></p><p style="text-indent: 2em">下面添一行</p><p style="text-indent: 2em"><span style="color: #ff0000">58 16 * * * root init 0 //每天16：58自动关机 </span></p><p style="text-indent: 2em"></p><p style="text-indent: 2em">附：</p><p style="text-indent: 2em">重启crond任务</p><p style="text-indent: 2em"></p><p style="text-indent: 2em">/sbin/service crond start //启动服务</p><p style="text-indent: 2em">/sbin/service crond stop //关闭服务</p><p style="text-indent: 2em">/sbin/service crond restart //重启服务</p><p style="text-indent: 2em">/sbin/service crond reload //重新载入配置</p>]]></description>
<link>http://www.chenggang.net/posts/64</link>
<pubDate>Thu, 11 Dec 2008 16:09:00 +0800</pubDate>
<author>admin</author>
<category>Linux</category>
<guid isPermaLink="true">http://www.chenggang.nethttp://www.chenggang.net/posts/64</guid>
</item>
</channel></rss>
