LoginSignup
25
22

More than 5 years have passed since last update.

cron で ruby を自動実行する

Last updated at Posted at 2013-12-18

which ruby

rubyのパスを取得し,


0 * * * * cd ’実行したいプログラムがあるディレクトリ'; 'rubyのパス' '実行したいプログラムのパス'  

cronは6つのフィールドにより形成

曜日 コマンド
0~59 0~23 1~31 1~12 0~7(0,7は日曜) 空白でもok

*は毎

コンマ(,)やハイフン(-)やスラッシュ(/)で時間指定、範囲、間隔値(例:1-5/2 後ろに指定した値の間隔で処理を実行するを指定可能

http://www.express.nec.co.jp/linux/distributions/knowledge/system/crond.html

25
22
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
22