Does anyone have a rclone copy restart script for windows?

I am connected via wifi and trying to rclone copy files but the problem is when the wifi gets disconnected with error like

Failed to copy: couldn't list directory: Get https://www.googleapis.com/drive/v3/files?alt=json&fields=<...>%29: dial tcp: lookup www.googleapis.com: no such host
it just stops and no longer retries.

Anyone have a good working windows 10 bat script or something to check if it is running on the command prompt or windows and just restart the copy in a few minutes?

Thanks.