You have a program or batch file that you have tested by running it directly from a Windows command prompt. When you run the same program or batch file from an adTempus job, the job fails.
When a job fails, adTempus will log a message in the Job Log indicating the reason. If the failure is due to a problem with your program or batch file, the failure message will generally indicate that the job returned a failure exit code:
If the failure is not the result of a failure exit code, see article K00000184 for other troubleshooting suggestions.
In this case the first step in diagnosing the problem is reviewing the output from your program or batch file. This can come from two sources:
If you are not already using the Capture Console setting in your job, you should enable that option and rerun the job.
Now rerun the job. After it fails, locate the failed instance on the History tab in the Console and open it. On the Captured Files page of the instance properties you will find a captured file named "Captured console output.txt". Open this file to view the output from the program or batch file. This will show you where and why the batch file failed.
Following are some common problems that cause batch files to fail when run in adTempus even though they work outside it.
When you test your batch file outside of adTempus, make sure you are logged in using the same user account that the adTempus job is configured to use. If Administrator permissions are required for anything run by the job, make sure you have checked the Run with highest privileges option in the Job Properties.
If your batch file uses drive letters that are mapped to network resources, it will fail unless you have mapped those drive letters on the Resources page of the Job Properties. (see the Network Access for Jobs help topic for more information). The error message shown in the captured output will be:
Though you can map the drive letter within adTempus, this is not recommended. Instead, you should replace all references to the drive letter with the corresponding UNC path. For example, suppose your batch file has this line:
The M: drive is mapped to the UNC path "\\prodserver3\data" (e.g., share "data" on server "prodserver3"). You would replace all references to drive M: with the UNC path:
Be sure that you fully qualify all paths and file names that you use. For example, suppose your batch file has this line:
When you test this it works, because you have the current directory set to "c:\processing" for your command prompt. When adTempus runs the batch file it will fail with the error "myprogram' is not recognized as an internal or external command, operable program or batch file", unless you have set the Startup Directory for the step.
Rather than depending on the directory to be set, you should specify the full path so Windows can find "myprogram":