Batch file: Run each 5 minutes

I want to write a batch file to run each 5 minutes
egovernmentAsked:
Who is Participating?
 
Steve KnightIT ConsultancyCommented:
Yes you can either schedule it using task scheduler like has been said, or you can run one batch that pauses for 5 minutes (ish), either using a third party util, or a "PING" command, e.g.:

@echo off
:loop
echo Do the things you want here.  It is %time%
for /l %%a in (5,-1,1) do (
  echo Waiting for %%a for minutes....
  ping -n 61 -w 1000 127.0.0.1 >NUL 2>&1
)
echo Running again now
goto :loop
And call that "Yourbatch.cmd" or whatever.

Steve
0
 
KOTiSCommented:
If you are running MS-DOS under Windows the you can create a schedule to run the batch file. If your only OS is MS-DOS then there are some resident programs. What is your OS?
0
 
Steve KnightIT ConsultancyCommented:
Thanks.  What did you end up doing?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.