Summary

When the "Skip if already running" option is checked for a scheduled program, the Scheduler makes two checks before starting the program. First, it checks to see if the program is already being run by the Scheduler. If the program is not already being run by the Scheduler, the Scheduler checks to see if the program is running outside the Scheduler. If the Scheduler determines through either of these checks that the program is already running, it will not start the program again.

The check for a program running outside the Scheduler is intended to prevent the Scheduler from starting a second copy of a program that you are already running manually. For example, the Scheduler is supposed to run a backup program daily at 8:00 PM. However, you decide to run the backup manually at 7:45 because you need to make a configuration change to the backup software, and this manual backup is still running at 8:00. In this case you would not want the Scheduler to start another backup while the first is still running.

In other situations, though, this behavior can cause problems. For example, you have the Scheduler configured to run two different Perl scripts at 2:00. The application for both of these scheduled jobs is "perl.exe", but two different scripts are specified using the command line parameters. For example, job A would be "perl.exe scriptA.pl"; job B would be "perl.exe scriptB.pl".

If the "Skip if already running" option is used in this case, the first job will start successfully. When the Scheduler goes to start the second script, it will check to see if the program specified in the job is already running. When the Scheduler checks for a running process, it can see only the executable name, not the command line, so it will only know to look for "perl.exe", which it will see is already running. The Scheduler therefore will not run the second job.

More Information

This problem will occur in any case where the same executable is used in multiple jobs, with different command-line parameters changing the behavior of the program. For example, two jobs that run Microsoft Access but point to two different databases; two jobs that execute FTP with different scripts, etc.

Workaround

To work around this problem use batch files to run the various scripts, instead of having the Scheduler run the scripts directly. For example, create a batch file called scripta.bat that contains the command "perl.exe scriptA.pl" and a second batch file called scriptb.bat that contains the command "perl.exe scriptB.pl". Then specify the batch file name as the Application in the Scheduler.

Status

Beginning with version 2.2.1 of the Arcana Scheduler you can determine whether the Scheduler should consider processes running outside the Scheduler when evaluating execution criteria for a job.

To download the latest version, see the download page.

After installing, see the "Registry Parameters" topic in the "Scheduler Service" book in the online help.