I want to create a module or code to ping an ip address , if the ping returns successful do nothing , if the ping fails wait 5 min try again , if it fails then doCmd ( switch off my cable modem power via x10 ) wait 1 min and doCmd ( switch my cable modem power back on via x10 ) wait 2 min and try the ping method again .
I want to do this every 15 min , any help from the board would be greatly appreciated .