I need to execute a synchronizing application continuously with a batch file. What I want to do is something like:
while true
execute application
sleep 1 minute
end while
Can this be done with CMD?
Thanks in advance.
I need to execute a synchronizing application continuously with a batch file. What I want to do is something like:
while true
execute application
sleep 1 minute
end while
Can this be done with CMD?
Thanks in advance.
Using pure batch you could do this:
:LOOP
yourprogram.exe
ping 127.0.0.1 -n 61 >NUL
goto :LOOP
This means you don't have to install any other programs or create more scripts. It might not be pretty but it works! I have pinged 61 times as pinging the loopback seems to create a delayed second.
Download unixutils for win32. In here, you will find sleep.exe. Put it somewhere in your path. (frex, in c:\windows)
Then, you can build a batch file similar to this
echo off
:here
sleep 60s
echo Exec app
rem your app goes here
goto here