Summary
When a program is run under the Scheduler, the environment in which it executes is slightly different from the environment in which it executes when run outside the Scheduler. This sometimes leads to problems that can be difficult to track down, especially in programs that were not designed to be run as "batch" or unattended processes.
This article discusses common problems encountered with scheduled programs, and techniques for tracking down the source of the problem.
More Information
Before contacting Arcana Development for assistance with a problem, you
should review this article and gather as much information about the problem as
possible; this will speed issue resolution.
Return (Exit) Codes
If the program is returning a return code or exit code other than 0, this
generally indicates that an error has occurred. See article
I02000002 for information on return codes.
A return code by itself usually is not enough to tell you what the problem is;
generally it is only an indication that a problem has occurred. Check the
documentation for the program you are running, or check with the provider of the
program, to see what, if anything, the error means.
Looking for Error Messages
A properly-designed application will produce some sort of error message to
tell you what the problem is when an error occurs.
First check to see if the program produces an error report or log file. If
such a log is not immediately apparent, check with the provider of the
application to see if it is possible to instruct the program to produce such a
log.
When you are looking for error messages, make sure that you have checked the
"Allow program to interact with desktop" option in properties for the scheduled
program in the Schedule Administrator. If this option is not checked, you will
not be able to see any error messages displayed by the program.
If you are running a batch file, see article
I02000046 for a technique for reviewing
the output from the batch file; this will help you find any error messages
produced by programs in the batch file.
If you are not running a batch file, and the program you are running is a
"console" program (i.e., it doesn't show any windows and displays output in the
"DOS" console window), create a batch file that calls the program. After the
call to the program, add a "pause" statement. Now have the Scheduler run this
batch file instead of running the program directly. After the program runs, the
pause statement will cause the console window to stay open, so you will be able
to see if the program is producing any error messages.
Things to Look For
Make sure you have the program configured to run under a user account
(when you set up the program you provided a user ID and password and did not
check the "Run under Local System account" on the Advanced page). See article
K00000015 for information on the Local
System account.
Verify that the program runs properly when run outside the Scheduler. Log
in to the computer using the same account you have configured the Scheduler to
use and run the program yourself.
If the program uses any network disk drives, see article
I02000003 for common problems with
networks.
If You Still Cannot Find the Problem
When you contact us for assistance, please give us as much information about
the problem as you can, including:
What program is producing the error.
What the program does. In particular, what you think it might be trying to
do when it produces the error.
What return code you are getting.
The exact error message, if any, that the program is producing
What steps you have taken to track down the problem