8.2.3 Command execution with recovery option
- Organization of this subsection
(1) Overview of the function
This item executes the specified recovery execution command if the execution command fails with an error.
(2) List of settings
Name |
Required |
Format |
Can specify inherited information? |
---|---|---|---|
Execution command |
Yes |
String (1 to 512 bytes) |
Yes |
Parameter |
No |
String (0 to 512 bytes) |
Yes |
Recovery execution command |
Yes |
String (1 to 512 bytes) |
Yes |
Parameter for recovery execution command |
No |
String (0 to 512 bytes) |
Yes |
Virtual user name |
No |
String (0 to 512 bytes) |
Yes (The profile information cannot be specified.) |
(3) Settings
- Execution command
-
Specify the file name of the command to execute.
A command is executed as a child process of the job execution service. When commands that require interactive operations are executed, those commands can be left running if you cannot perform operations in the window. (You can check this by the Task Manager or an alternative.) If you execute a command that requires interactive operations, use the command execution with the window item.
If specifying a file whose extension is other than .exe or .bat, you need to associate the file extension with an appropriate application.
- Parameter
-
Specify the parameter for the execution command.
- Recovery execution command
-
Specify the file name of the command to execute when the execution command ended abnormally.
For notes and other details, see the descriptions of Execution command.
- Parameter for recovery execution command
-
Specify the parameter for the recovery execution command.
- Virtual user name
-
Specify the name of the virtual user mapped to the name of the Windows user who executes the item. If the virtual user name is omitted, the item is executed with the account for the CPA job execution service.
To map the virtual user name, use the cpasetumap command. For details on the cpasetumap command, see cpasetumap in 9. Commands.
(4) Return values
Value |
Description |
---|---|
Other than 126 |
Return values of execution commands. Return values of the recovery execution command if recovery is performed. |
126 |
The internal processing of CPA ended abnormally during startup of the execution command or recovery execution command.
|
(5) Example
Execution command |
cmd.exe |
Parameter |
/c if not exist c:\temp\hello.txt exit 1 |
Recovery execution command |
cmd.exe |
Parameter for recovery execution command |
/c msg.exe# console /w Failure! |
(6) Command name that is output to log files
cpaactexec.exe