Created
March 30, 2019 05:41
-
-
Save rounakdatta/d993016550ce100205ea16e77fe95dae to your computer and use it in GitHub Desktop.
Keep hypersomniac sites awake
This file contains hidden or 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
function keepMyServerAlive() { | |
var allMySites = ['https://google.com']; | |
for (var siteIndex in allMySites) { | |
var currentSite = allMySites[siteIndex]; | |
try { | |
var response = UrlFetchApp.fetch(currentSite); | |
Logger.log(response.getContentText()); | |
} catch(e) { | |
Logger.log(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setting this up at https://script.google.com to be triggered in intervals of 10 mins must help!