I have this bash script looped running in Linux, what is the Windows equivalent of doing this?
while ./process.sh; do sleep 1; done
I have a windows batch file that I would like to run as long as the return code is 0
I have this bash script looped running in Linux, what is the Windows equivalent of doing this?
while ./process.sh; do sleep 1; done
I have a windows batch file that I would like to run as long as the return code is 0
cmd /q /e /c"for /l %%a in () do (call process.cmd || exit) & >nul timeout /t 1"
If you want to test it from command line, change %%a
with %a
I think you are looking for something like this:
:LOOP
timeout /T 1 /NOBREAK
call "\path\to\your\process.sh\equivalent\batch\file"
if not ErrorLevel 1 goto :LOOP
Note: This does not work on the command line. You need to place this code in a batch file.