<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>https://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>https://jackxiang.com/post//</link>
<title><![CDATA[Linux后台进程(cron和crontab)]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Sat, 29 Dec 2007 02:42:06 +0000</pubDate> 
<guid>https://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	. 设置crontab文件，并用它来提交作业<br/>. 使用at命令来提交作业<br/>. 在后台提交作业<br/>. 使用nohup命令提交作业<br/><br/>cron 系统调度进程，使用它在每天得非高峰负荷时间段运行作业，或者在一周或一月中得不同时段运行<br/>at命令，在特定时间运行一些特殊作业<br/>&amp; 使用它在后台运行一个占用时间不长得进程<br/>Nohup 使用它在后台运行一个命令，即使在用户退出时也不受影响。<br/>3.1 cron和crontab<br/>cron 是系统得调度进程，在无需人工干预得情况下运行作业。<br/>crontab命令允许用户提交，编辑或者删除相应得作业。每个用户都有一个crontab文件来保存调度信息，<br/>3.1.1 crontab的域<br/> &nbsp;第1列 &nbsp;分钟1~59<br/> &nbsp;第2列 &nbsp; 小时1~23<br/> &nbsp;第3列 &nbsp; 日1-31<br/> &nbsp;第4列 &nbsp; 月1~12<br/> &nbsp;第5列 &nbsp; 星期0~6<br/> &nbsp;第6列 &nbsp; 要运行的命令<br/>3.1.2 条目举例<br/> &nbsp;30 21 * * * /apps/bin/clearnup.sh<br/> &nbsp;每晚的21:30运行/apps/bin目录下的cleanup.sh<br/> &nbsp;45 4 1,10,22 * * /apps/bin/backup.sh<br/> &nbsp;每月的1，20，22号的4:45执行/apps/bin 目录下的 backup.sh<br/> &nbsp;<br/> &nbsp;10 1 * * 6,0 /bin/find -name &quot;core&quot; rm {} &#92;;<br/> &nbsp;每个星期六。日1:10运行一个find 命令<br/> &nbsp;0,30 18-23 * * * /apps/bin/dbcheck.sh<br/> &nbsp;每天在18:00~23:00每隔30分钟执行/apps/bin目录下的dbcheck.sh<br/> &nbsp;0 23 * * 6 /apps/bin/qtrend.sh<br/> &nbsp;每周六的23:00执行/apps/bin/qtrend.sh<br/>3.1.3 crontab的命令选项<br/> &nbsp;crontab [-u user] -e -l -r<br/> &nbsp;-u 用户名<br/> &nbsp;-e 编辑crontab文件<br/> &nbsp;-l 列出crontab文件的内容<br/> &nbsp;-r 删除crontab文件<br/>3.1.4 创建一个crontab文件<br/> &nbsp; &nbsp; &nbsp;crontab faintbearcron<br/>3.1.5 列出crontab文件<br/> &nbsp; &nbsp; &nbsp;crontab -l<br/> &nbsp; &nbsp; &nbsp;crontab -l &gt;$HOME/faintbearcron<br/> &nbsp; &nbsp; &nbsp;（备份）<br/>3.1.6 编辑crontab文件<br/> &nbsp; &nbsp; &nbsp;crontab -e<br/>3.1.7 删除crontab文件<br/> &nbsp; &nbsp; &nbsp;crontab -r<br/>3.1.8 恢复丢失的crontab文件<br/> &nbsp; &nbsp; &nbsp;crontab &lt;filename&gt; <br/> &nbsp; &nbsp; &nbsp;其中&lt;filename&gt;就是你在$HOME目录中的副本的文件名
]]>
</description>
</item><item>
<link>https://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] Linux后台进程(cron和crontab)]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>