How do I use ping to set an alarm?

Hi, I'm kind of new to this stuff.

So I was looking around google on how to use ping ip addresses, but I could only find instructions on how to do a ping and not to do something with it.

Basically, I have a computer connected to another computer that needs to be connected at all times, but lately once in a month or two, one of the computer get disconnected. When that happens, I need to reset it immediately, even in the middle of the night, but I can't just keep myself awake 24/7.
So I thought how about I just continuously ping the connection and set off an alarm to wake me up when the connection cuts off.

My questions are
1) Is this a bad idea, and if so, what are alternatives?
2) If not, how do I do it?

Thanks
Assuming you are on windows. The quickest option would be to use a .bat file.
just do a quick google search for 'bat ping alarm' or 'bat ping notifications'
reddit.com/r/commandline is a great sub that will help you if you run into any snags with command line!
Thanks, I don't know why I didn't think of that before -_-
Topic archived. No new replies allowed.