Created
October 30, 2008 21:57
-
-
Save russ/21155 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
require 'open-uri' | |
while true do | |
r = open('http://google.com') | |
raise StandardError if r.status != [ '200', 'OK' ] | |
timestamp = Time.parse(r.read.match(/\<!\s*-- (.*?) (.*?)(--\s*\>)/)[2].strip) | |
raise StandardError if (Time.now - timestamp) > 600 | |
sleep(60) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment