|Oh man... I strongly recommend you don't let a batch file sit for hours to do a command. Nothing good will come of it.|
The Ping will only work if you are connected to the internet, so if your internet fail during the night for some reason, so will your batch file.
I suggest you do what ace_omega said if you are still wanting to do this.