create_job

Creates and schedules a job. This verb supports multi-task jobs.

Note:

EM CLI permits OS Script jobs to be run against database targets by setting the targetType property for -input_file in the create_job verb. For example:

targetType=oracle_database

You can set other target types similarly.

EM CLI supports the following job types:

ASMSQLScript
ASSOCIATE_CS_FA
ASSOCIATE_DOMAIN_FA
AssociateClusterASM
BlockAgent
CoherenceCacheAddition
CoherenceNodesRefresh
Config Log Archive Locations
DbMachineDashboard
DiscoverPDBEntities
FusionMiddlewareProcessControl
GlassFishProcessControl
InstallKernelModuleJob
Log Rotation
OSCommand
OpatchPatchUpdate_PA
RMANScript
RefreshFromEMStore
RefreshFromMetalink
RefreshFusionInstance
SOABulkRecovery
SQLScript
ShutdownDB
StartDepartedCohNodes
StartDepartedCohStoreNodes
StartFusionInstance
StartupDB
StatspackPurge
StopFusionInstance
Upgrade Exalogic Systems
WebLogic Domain Discover
WebLogic Domain Refresh
WLSTScript

Note:

Not all job types support all target types. Use describe_job_type to determine which target types are supported for a given job type.

Format

emcli create_job
   -input_file=property_file:"filename"
   [-name="job_name"]
   [-type="job_type"]

[ ]  indicates that the parameter is optional

Options

  • name

    Name of the job.

  • job_type

    Name of the job type. You can obtain a template property file for the job type by using the describe_job_type verb.

  • input_file

    Provide the file name to load the properties for creating and scheduling the job. The property file must be accessible to the EM CLI client for reading. Another job of the same job type could also be used to generate the property file using the EM CLI verb describe_job.

    For more information about the input_file option, see -input_file Syntax Guidelines.

Example

This example creates and schedules a job with name MYJOB1 and job type MyJobType1 with the property file present at location /tmp/myjob1_prop.txt.

emcli create_job -name=MYJOB1 -job_type=MyJobType1 -input_file="property_file:/tmp/myjob1_prop.txt"