JSI Tip 6220. How can I 'schedule' a process to start as soon as it stops?

If you need to cause a process to start as soon at it stops, use the %0 batch parameter.

The %0 parameter contains the name of the invoked process, regardless of how it was invoked; i.e., by the scheduler, a batch, a shortcut, a program, or the Run command.

 Here is an example of Continuous.bat:

@echo off
setlocal
set this=%0
YourProgram.exe
endlocal&%this%



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish