echo "starting loop"
ping www.sitetotest.com >>log.txt
Select allOpen in new window
EndTime = Timer + 10 ' seconds
' run ping command here
Wscript.Sleep 1000 ' millisecoinds
Loop While Timer < EndTime
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent
If you wanted to work in Powershell or VBS instead they can readily do these types of calculations, but not sure that works for you.
Would it be okay for you to leverage a "stopwatch" type add on EXE from your BAT script. There are several of these (I mention one in that link above) that you could potentially use to calculate the elapsed time and wait until it exceeded your desired interval, like 1 minute. Would that be feasible?