Hello. I'm having a weird task scheduler problem that I think some more savvy folks out there might be able to help with. I'm having this weird issue where my internet disconnects just long enough to drop my connection, but not long enough to trigger Windows to reconnect automatically when it comes back up maybe 3 or 4 seconds later. According to my ISP the error is on their end and is a problem with my neighborhood's node, and they won't be fixing it any time soon. So to resolve this on my own, basically I have set up a task to monitor my connection with a batch file by doing a ping to google (just for simplicity's sake) and if it's unsuccessful then disable/reenable my ethernet network.
This is all of the code, there's nothing more to it than this. The problem I'm having is that I set up the task to run, but I don't know how to make it execute indefinitely once I start it running. Currently it activates at startup, but goes back to 'ready' after checking the scheduler again and does not work when my internet drops. It also gives a 'last run result' of (0x1). If I just run this by itself when I'm having connectivity problems it works fine.
My settings for the task are as follows:
https://i.imgur.com/IbFr5zv.png
https://i.imgur.com/BX9507P.png
https://i.imgur.com/pIoPAaF.png
Keep in mind that I don't want it to repeat every x minutes, I want it to restart and run again as soon as it ends, indefinitely.
Alternatively, is there a way to have Windows monitor my connection by itself and then execute a task if it disconnects? That way I can just avoid doing the ping at all.
This is all of the code, there's nothing more to it than this. The problem I'm having is that I set up the task to run, but I don't know how to make it execute indefinitely once I start it running. Currently it activates at startup, but goes back to 'ready' after checking the scheduler again and does not work when my internet drops. It also gives a 'last run result' of (0x1). If I just run this by itself when I'm having connectivity problems it works fine.
My settings for the task are as follows:
https://i.imgur.com/IbFr5zv.png
https://i.imgur.com/BX9507P.png
https://i.imgur.com/pIoPAaF.png
Keep in mind that I don't want it to repeat every x minutes, I want it to restart and run again as soon as it ends, indefinitely.
Alternatively, is there a way to have Windows monitor my connection by itself and then execute a task if it disconnects? That way I can just avoid doing the ping at all.