Skip to content

Instantly share code, notes, and snippets.

@andrewyoo
Created March 20, 2012 19:20
Show Gist options
  • Save andrewyoo/2140119 to your computer and use it in GitHub Desktop.
Save andrewyoo/2140119 to your computer and use it in GitHub Desktop.
Cron to keep sites on shared hosts active
#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