Skip navigation

JSI Tip 2422. How do I schedule a job to run every n minutes, using freeware?

You schedule the initial execution of the .bat file using the AT command or the Task Scheduler, or you can just run it.

At the end of the batch file, insert:

RSOON n*60 /i=Interactive "%comspec% /c %~dpnx0"

where n*60 is the number of seconds. If you wanted to schedule the job every 5 minutes, n*60 would be 300.

RSOON is freeware at tip 2395.

%comspec% is the System Evironment variable that points to the Command processor (CMD.EXE).

%~dpnx0 is a variation on tip 0494 and points to the current file (your batch).

Hide 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.