Soon.exe: Near-Future Command Scheduler Topics | Previous

Soon Example: Running a Command Every Five Minutes

If, for example, you wish to run Someprog.exe every five minutes, create a command file as follows:

Every5.cmd:
	SOON 300 Every5.cmd
	Someprog.exe

Then schedule Every5.cmd by using AT or Soon (for example, run Soon Every5.cmd). When Every5.cmd runs, it immediately reschedules itself to run five minutes (300 seconds) in the future, and then proceeds to perform the intended task by running Someprog.exe. Alternatively, if you wish to run Someprog.exe repetitively, but wish to have five minutes of idle time between runs of Someprog.exe, create a command file as follows:

Idle5.cmd:
	Someprog.exe
	Soon 300 Idle5.cmd

Then schedule Idle5.cmd by using AT or Soon (for example, run Soon Idle5.cmd). When Idle5.cmd runs, it performs the intended task by running Someprog.exe, and then reschedules itself to run again five minutes (300 seconds) in the future.