Off the top of my head here's an idea. What if you added two more scripts to the set, one that launches the connect, and one that closes it. Then add a wait type command to all of the scripts except the "opener", so all scripts would launch at the same time but all scripts except the one you want to run first, for powershell the command is start-sleep, Start-Sleep. So add a start-sleep -s 15 to the scripts that are already part of the template. For the "closer" script add in a wait for however long you need to in order to complete the previous calls, I guess I'd probably just make this value a bit shorter than the overall timeout, which is 300 seconds for this template.
Polling interval starts at 00:00
00:00 "start" script runs and opens connection
00:15 other scripts begin their business....
04:30 closer script kills the connection
and at 05:00 we open another connection and cycle through again.