The following describes about creating the batch files to be processed by Jobscheduler easily.
Usually, when a certain operation is carried out, a series of processes are incorporated in sequence into one batch file. However, when using the Jobscheduler, batch files can be divided by the processes so that respective status may be easily monitored. This enables not only the monitoring but also the actions to be taken in response to abnormal situations to be handled more smoothly.
The following would be helpful when creating batch files to be registered in the Jobscheduler.
One batch file consists of a group of processes.
When allocating the subsequent processes according to the return values of commands (programs), put the commands and the subsequent processes in one batch file.
If parallel processing is possible, create individual batch files for commands and subsequent processes, respectively.
Limit the number of batch files to be registered as jobs in one job net to a certain level so that you can easily monitor them. (Up to 255 jobs)
When starting a child process from a batch file, make the parent process control the completion codes, etc. for the child process.
Completion codes for batch files
The return code for the last command (program) in a batch file will be carried over as the completion code for the batch file. To set an optional value as the completion code for a batch file, use the setecode command provided by the Jobscheduler. Specifically, manage the return code in the middle of the batch file and set the value as the final completion code of the batch file using the setecode command. The setecode command is stored in the MpWalker.JM\bin directory under the Systemwalker Operation Manager installation directory.
The following provides the command syntax of the setecode command and an example of a batch file using the setecode command.
Command syntax of the setecode command
setecode completion code (0 to 200) |
Example of a batch file using the setecode command
echo off application.exe <--Executes the program. |