Home > Linux | 自宅サーバ > cronのリダイレクト

cronのリダイレクト

  • Posted at 2008/09/07 23:44
  • Categories: Linux, 自宅サーバ
  • Tags:
  • hatena button
  • hatena count
  • save this page del.icio.us

 ちょっと復習もかねてメモ。

 cronを使って定期的にプログラムを実行したい場合、以下のように記述するわけだが。

#毎日04時30分に「/usr/local/bin/tesh.sh」を走らせる場合。
30 04 * * * /usr/local/bin/test.sh

 これによって、一日に一回、上記のスクリプトを走らせた結果が、root宛にメールでくる。

 これを回避?する方法として、リダイレクトを使う。

 上記の場合で、実行結果をすべて破棄する場合。

30 04 * * * /usr/local/bin/test.sh >/dev/null 2>&1

で、

 

 

Comments:0

Comment Form
Remember personal info

Trackbacks:0

Trackback URL for this entry
http://www.multiburst.net/ElectricBrain/2008/09/cron/trackback
Listed below are links to weblogs that reference
cronのリダイレクト from ElectronicBrain is eating BreakFast

Home > Linux | 自宅サーバ > cronのリダイレクト

Recent Posts
Sponsored Link
今読んでいる本
Recent Comments
Recent Trackbacks
RSS はてブ人気エントリー
楽天AD
Hatena Bookmark

この日記のはてなブックマーク数

feedburner

あわせて読みたい
Yahoo! ログール
feedmeter

フィードメーター - ElectronicBrain is eating BreakFast

BlogRanking

Trackword

Return to page top