Skip to content

Instantly share code, notes, and snippets.

@nalanj
Created May 7, 2011 02:33
Show Gist options
  • Select an option

  • Save nalanj/960141 to your computer and use it in GitHub Desktop.

Select an option

Save nalanj/960141 to your computer and use it in GitHub Desktop.
How to set up cron for a particular time on Heroku
# Heroku only lets you run cron jobs at the specific time that you add cron to your app, so here's a quick script that I used
# to make that happen.
until Time.now.hour == 3 && Time.now.min == 30
puts "Still not time..."
sleep 60
end
system("heroku addons:add cron")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment