Help us understand the problem. What is going on with this article?

cron で ruby を自動実行する

More than 5 years have passed since last update.
which ruby


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


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


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

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away