i'm having trouble writing code that will do the following:
infinite loop. Every 1 minute check if the computer is online (try to ping a server or something), if the machine is online, do nothing, else try again in a minute (do nothing basically), but if machine is offline for 5 minutes then shut it down.
What is going on is, I bought a UPS, that doesn't have a USB port, so the UPS can't shutdown my PC. So figured, if my connection is down then there is a 99% chance that my electricity isn't working either (my ISP is great).
been digging the forum and can't figure it out by myself
Can anybody help me? Buying virtual beer
![Razz :P](./images/smilies/icon_razz.gif)
![Why blow the cream? :beer:](./images/smilies/beer.gif)