Ryo
Ryo

Reputation: 1035

Batch script run with schedule in windows

I have a doStuff.bat script with this command : "%HOME%\bin\groovy.bat" "%HOME%\bin\DoSth.groovy" What can i do to get that command run every 5 minute without using Window Task Schedule?

Upvotes: 1

Views: 5641

Answers (1)

foxidrive
foxidrive

Reputation: 41234

The timeout command in modern windows will pause for 5 minutes/300 seconds.

@echo off
set "home=c:\home folder"
:loop
call "%HOME%\bin\groovy.bat" "%HOME%\bin\DoSth.groovy"
timeout 300
goto :loop

Upvotes: 4

Related Questions