cronの設定をしてみます。


【前提】 

・RedhatEnterpriseES4

・cronデーモンが起動している事


※起動していない場合は、

/etc/rc.d/init.d/crond start

で起動します。



① #crontab -e   ・・・ cron設定のviが立ち上がる



② 立ち上がったviで以下を設定。


  53 20 * * * /usr/bin/php /etc/crontest/crontest.php

  これの意味は、

  毎日20:53に/etc/crontest/crontest.phpを起動しますよ、

  という感じになります。


  ※phpにパスを通す事をお忘れなく(環境により異なります)。



③ /etc/crontest/crontest.phpに実行権限を付与


  #chmod 755 /etc/crontest/crontest.php



これでOK。



※ cronの起動ログは/var/log/cronになります。

※ crontab -e で現在の設定内容が確認できます。