Skip to content

Instantly share code, notes, and snippets.

@dommmel
Last active December 11, 2015 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dommmel/4665881 to your computer and use it in GitHub Desktop.
Save dommmel/4665881 to your computer and use it in GitHub Desktop.
require 'rufus/scheduler'
scheduler = Rufus::Scheduler.start_new
if Rails.env.production?
scheduler.every '10m' do
require "net/http"
require "uri"
Net::HTTP.get_response(URI.parse(ENV["HOSTNAME"]))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment