Ok I've had this problem previously and I realized its due to the method of initial execution of the batch file.
So let's say: you run the batch file directly and everything loads up fine and you leave it as it is correct? Yup that's what I used to do. Then out of the blue before it is even one hour (I set mine to 1hr) the batch file restarts. I'm guessing you have the same experience?
It's due to the task scheduler being active and remembering the start time that it has started running the batch file and not from the time you manually executed it. So after you manually run the batch file, at some time within the 2 hours, task scheduler will say: hey! My 2hrs is up, time to run the next cycle.
So this usually happens only on the first cycle (if you did a manual start run). 2nd run onwards will be fine coz task scheduler will keep the 2hr consistent.
If you want a constant 2hrs, you should run the task inside the task scheduler based on the "triggers". Usually I set it to run upon task modification. So if I want it to run, I'll just modify the task a little bit by typing some crap into the comments. After clicking OK, the task will run normally.
If its too troublesome for you, just run the manual way. Just take note that the first run will be a little off.
Hope this answers your questions
Cheers~!