title: sleep function in a batch script
body: <p>I am creating a batch file to run a program on my desktop <code>xyz.exe</code> for 4 hours, then close it for 1 hour and repeat the process. Here is my script.</p>
  
  <pre><code>:a
  START C:\Users\Mukul\Desktop\xyz.exe
  SLEEP 14400
  taskkill /F /IM xyz.exe
  SLEEP 3600
  goto :a
  </code></pre>
  
  <p>According to <a href="http://www.robvanderwoude.com/wait.php" rel="noreferrer">here</a>, the script should wait. It also says:</p>
  
  <pre><code>SLEEP 10
  </code></pre>
  
  <p>will delay execution of the next command by 10 seconds. so <code>SLEEP 14400</code> should delay the execution by 4 hours.</p>
  
  <p>Current results:
  Next command gets executed as soon as the first command completed.</p>
  
  <p>Desired results:
  Next command should wait for 4 hours before executing the last command.</p>