Skip to content

Instantly share code, notes, and snippets.

@ysaito8015
Last active August 29, 2015 14:15
Show Gist options
  • Save ysaito8015/c4301a90395ff7883418 to your computer and use it in GitHub Desktop.
Save ysaito8015/c4301a90395ff7883418 to your computer and use it in GitHub Desktop.
Heroku Scheduler で月一回だけ実行したい ref: http://qiita.com/ysaito8015@github/items/578f7ebd6bfe3fb00d4e
[ $(date +%d) = 01 ] && ruby ./batch.rb #毎初日に実行
[ $(date +%d) = 01 ] && ruby ./batch.rb #毎初日に実行
heroku config:add TZ=Asia/Tokyo
[ $(date +%u) = 1 ] && ruby ./batch.rb #毎月曜日に実行
[ $(date +%u) = 1 ] && ruby ./batch.rb #毎月曜日に実行
[ $(date +%m) = 02 ] && [ $(date +%d) = 14 ] && ruby ./batch.rb #2/14に実行
[ $(date +%m) = 02 ] && [ $(date +%d) = 14 ] && ruby ./batch.rb #2/14に実行
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment