Created
July 1, 2013 21:49
-
-
Save mholubowski/5904945 to your computer and use it in GitHub Desktop.
prevent heroku idling
This file contains 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
# in /tasks/scheduler.rake | |
desc "Called by Heroku cron add-on to stop spin down" | |
task :call_page => :environment do | |
uri = URI.parse('http://www.mikeholubowski.com/') | |
Net::HTTP.get(uri) | |
puts 'Pinged the site!' | |
end | |
# then use the heroku cron add-on to schedule it for every x minutes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment