Skip to content

Instantly share code, notes, and snippets.

@wildjcrt
Created December 4, 2013 11:47
Show Gist options
  • Save wildjcrt/7786308 to your computer and use it in GitHub Desktop.
Save wildjcrt/7786308 to your computer and use it in GitHub Desktop.
desc "Pings PING_URL to keep a heroku dyno alive"
task :dyno_ping do
require "net/http"
if ENV['PING_URL']
uri = URI(ENV['PING_URL'])
Net::HTTP.get_response(uri)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment