....... Or simply create a shortcut to your mining .bat file and put it into your startup folder (windows: run>shell:startup). That way, when your mining rig encounters an error and windows restarts itself, your miner will also automatically restart. Good luck to you.
I think that's not a good solution, imagine if the restarting interval is 2-5 minutes. Will be better if OP trying to find the problems and trying to solve it. Many factors, I think, and OP need to do step by step analyzing to find the problems.