Database Reference
In-Depth Information
The output from this command can be used as a property file to create a new job.
1.
Copy the text into a file and modify the variables as necessary (Listing 3-27).
2.
To save a step, use the shell capabilities to redirect standard output to a file.
3.
Copy the file just created to a new file and open that new file in a standard text editor
(Listing 3-27).
4.
Change the job name and command in the new file to reflect the new job (changes are
shown in bold; Listing 3-28).
Listing 3-27. Create the uname_a_oms.job job properties file and make a copy
[oracle ~]$ emcli describe_job -name='UNAME_A_OMS' > uname_a_oms.job
[oracle ~]$ cp uname_a_oms.job uname_r_oms.job
Listing 3-28. Create the uname_r_oms.job job properties file
[oracle ~]$ cat uname_r_oms.job
# Current status of the job is EXPIRED.
name= UNAME_R_OMS
type=OSCommand
owner=SYSMAN
target_list=oraoem1.example.com:host
# Credential Usage: defaultHostCred
# Description:
cred.defaultHostCred.<all_targets>:host=SET:HostCredsNormal
# Description: (Optional) Comma separated list of parameters to the command.
variable.args=/bin/ uname -r
# Description: (Optional) Command to run on the target.
variable.command=%job_default_shell%
schedule.frequency=IMMEDIATE
Create the new job, specifying the new properties file as the input file, as shown here:
[oracle ~]$ emcli create_job -input_file='property_file:uname_r_oms.job'
Creation of job "UNAME_R_OMS" was successful.
The UNAME_R_OMS job is now an active job. The same process can be used to create a job in the library by
specifying the describe_library_job verb:
[oracle ~]$ emcli describe_library_job -name='UNAME_A'> uname_a.job
[oracle ~]$ cp uname_a.job uname_r.job
Edit the uname_r.job file. Listing 3-29 shows the contents of the script and uses the create_library_job verb to
create the library job from the script.
Search WWH ::




Custom Search