Created
May 7, 2011 02:33
-
-
Save nalanj/960141 to your computer and use it in GitHub Desktop.
How to set up cron for a particular time on Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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