Overview
EVM Command Line allows you to run an EVM job via the shell. With this capability you can create and save jobs using the graphical user interface, then run them later from the command line or from script files.
When used in conjunction with scheduling applications, the EVM Command Line feature allows maximum flexibility in the execution of EVM jobs.
Including EVM Command Line in the EVM Server Path
EVM Command Line is a program that is installed on the EVM Server and all EVM Clients. It is recommended that you include its location in the Path environment variable. This will eliminate the need to include the path each time you run an EVM job from the command line or script file. The EVM Command Line program file is named evmcl. The default directory location is:
/opt/CPQevm/bin
Running a Job from the Command Line
To view the command syntax, run evmcl with no arguments.
To run an EVM job, specify the EVM Server and job name.
Example
To run a job named stor1_backup_daily_sales on the EVM Server named Enterprise, you would enter:
evmcl enterprise stor1_backup_daily_sales
Running a Job from a Script File
To run an EVM job from a script file, use a text editor to create the script file and include the EVM command that will run the job.
Working with Job Return Codes and the Immediate Switch
When designing a script file to run an EVM job, you can include conditional statements to examine the job return codes that are issued by EVM. Return code values are shown in the display above.
When run in the default mode (Immediate switch off ), EVM monitors the job progress. When a job runs to successful completion EVM returns a 0 code to the script file. If an error event occurs, EVM will issue return codes 2, 3, 4 or 5. Codes 2, 3 and 4 mean that the EVM job did not run successfully for the reason implied by the code value. Code 5 includes a text error message from EVM.
When run with the Immediate switch on, EVM does not monitor the job, but immediately issues job return code 1 to the script file. No events or errors of any type are reported by EVM.
By choosing the default mode (Wait), you can establish the dependencies that are useful for sequential operations.
By choosing the Immediate mode, you can reduce or eliminate job dependencies and run operations in parallel.