Executing code every 5 minutes in a Batch file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ioshonowo
    New Member
    • Sep 2007
    • 31

    Executing code every 5 minutes in a Batch file

    Hello. Could someone give me the command that will allow my batch program to execute an iteration of a for loop then wait 5 minutes and execute another iteration.

    I have tried wait and sleep but they do not work.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    You are working with only batch file or any other frontend tool ?

    Comment

    • ioshonowo
      New Member
      • Sep 2007
      • 31

      #3
      I am using DOS command prompt. Nothing else.
      Here is some sample code
      Code:
      for /L %%i in (1,1,9) do Y:\00%%i\*.* X:\ wait 20
      pause
      or
      Code:
      for /L %%i in (1,1,9) do Y:\00%%i\*.* X:\ sleep 20
      pause

      Comment

      Working...