Created
June 5, 2016 08:19
-
-
Save chrisbrownie/2b7c277aaeba03fcd24feda2c0b562ed to your computer and use it in GitHub Desktop.
Lets you know, loudly, when a site is available
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
$uri = "https://flamingkeys.com" | |
while ($true) { | |
try { | |
Invoke-WebRequest $uri -TimeoutSec 5 | |
start "https://www.youtube.com/watch?v=xos2MnVxe-c" | |
break | |
} catch { | |
"Down" | |
} | |
Start-Sleep -Seconds 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment