Created
March 20, 2012 19:20
-
-
Save andrewyoo/2140119 to your computer and use it in GitHub Desktop.
Cron to keep sites on shared hosts active
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
#put file list on dropbox public folder | |
#run cron every 5 mins | |
page = `curl 'http://dl.dropbox.com/u/xxxxxxx/sites_to_reload.txt' 2>/dev/null` | |
sites = page.split("\n").each do |site| | |
`curl '#{site.strip}' > /dev/null 2>&1` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment