Skip to content

Instantly share code, notes, and snippets.

@aharpole
Created August 18, 2014 20:41
Show Gist options
  • Save aharpole/363dd6696d58db9856f7 to your computer and use it in GitHub Desktop.
Save aharpole/363dd6696d58db9856f7 to your computer and use it in GitHub Desktop.
Pinger - a simple tool that you can run on Heroku that will ping a bunch of sites on your behalf
source 'http://rubygems.org'
gem "httparty"
GEM
remote: http://rubygems.org/
specs:
httparty (0.11.0)
multi_json (~> 1.0)
multi_xml (>= 0.5.2)
multi_json (1.8.1)
multi_xml (0.5.5)
PLATFORMS
ruby
DEPENDENCIES
httparty
require 'rubygems'
require 'bundler/setup'
require 'httparty'
SITES_TO_PING = [
'http://google.com'
]
SITES_TO_PING.each do |site|
HTTParty.get site
p "successfully pinged site #{site}"
end
scheduler: bundle exec ruby pinger.rb -p $PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment