Summary

The Scheduler allows you to specify that a program should be run only if another process (program) is or isn't running. If you specify a batch file or a 16-bit program as the process the Scheduler should check, the Scheduler will always report that the process is not running, even if it is.

More Information

The Scheduler determines whether a process is running by looking at the process list maintained by the operating system.

When the system runs a 16-bit program, it actually runs a process called NTVDM.EXE, which in turn runs the application. NTVDM therefore appears in the process list; the actual application is listed as a child of this process. The Scheduler can determine that NTVDM.EXE is running, but cannot determine which 16-bit programs NTVDM is running.

Similarly, when the system runs a batch file, it actually runs an instance of the command console, CMD.EXE, which in turn runs the batch file. Only CMD.EXE appears in the process list, so the Scheduler cannot determine whether a specific batch file is running.

Workaround

One way around this problem is to have the scheduled program create a semaphore file that the Scheduler can look for instead of the running process. For example, you need the Scheduler to determine whether the 16-bit application someapp.exe is running. Instead of running someapp.exe directly, embed it in a batch file similar to the following:

copy sem.txt sem.sem

someapp.exe

del sem.sem

(sem.txt can be any file; the contents do not matter).

Then configure the Scheduler to check for the presence or absence of the sem.sem file instead of the process itself. If the file exists, this indicates that the process is running, because the batch file creates the semaphore file before starting the program and deletes it as soon as the program finishes.

Status

This condition is a limitation of the Windows NT operating system. We are currently investigating methods for overcoming this limitation in a future release.