submit job
You can use the submit job command option to start a job.
Overview
You can use the submit job command to start a job with pre-defined conditions. To run the command you must have submitdb access to the job. To use the alias keyword for the job, make sure to specify the job name in the database by including the keyword. If you submit a single job, a job stream with the same name is created and submitted. The job stream contains only the job you submitted.
Syntax and command line options
Before you run the command, you must specify the details of the command line options such as job name and required permissions. There are mandatory and optional parameters which you can use to schedule the start of a job. You can create the command as follows:
ocli plan submit job|sbj workstation#[folder/]jobname [;alias[=name]] [;into=[[folder/]workstation#]jobstream_id;schedid | [folder/]jobstreamname([hhmm[date]])] joboption[;...] [;vartable=tablename] [;noask]
You can add the parameters according to the specific results you want to achieve. The only mandatory parameter is jobname. The details required for each parameter are as follows:
- workstation
- Specify the workstation to run the job on. You can use wildcard characters. If you use wild cards, the job starts on all matching workstations. If you do not specify a workstation, the job runs on the default workstation.
- jobname
- You must specify the name of the job to start.
You must specify the name of the job which you want to launch. You can use wildcard characters. I you use wildcard characters all matching jobs are submitted. If the job is already in plan, and submitted into the same job stream, you must use the alias keyword to assign a unique name.
- alias=name
- You can specify a unique name for the job, which can be used in place of the jobname parameter. If you add the alias keyword without specifying a name, a name is created that includes the first 5 alphanumeric characters followed by a random ten digit-number.
- into=[folder/]jobstream_instance
- Specify the jobstream instance the job will be launched into. You can also provide the folder that contains the job stream definition.
Select the job stream instance by entering one of the following commands:
-
[[folder/]workstation#][folder/]jobstreamname([hhmm[ date]])
-
[[folder/]workstation#]jobstream_id ;schedid
- joboption
Options | Reference |
---|---|
at
time[timezone | tz
tzname][+n day[s]
| mm/dd |
mm/dd/yy] |
at |
deadline= time [timezone | tz][+n day[s] [mm/dd |
mm/dd[/yy]]] |
deadline |
follows
[[folder/]workstation#][folder/]{jobstreamname[hhmm
[mm/dd[/yy]]][.job | @] |
jobstream_id.job;schedid}| job[,...]
[if 'condition_name[|
condition_name][| ...]']
|
follows. |
maxdur=[time] [onmaxdur action] |
maxdur |
mindur=[time] [onmindur action] |
mindur |
until time
[timezone|tz
tzname][+n day[s]]
[;onuntil action] |
until and onuntil |
vartable=tablename |
You must specify the name of the variable table, if you are
not using the default variable table to run the job. For more
information, see Variable table definition. Important: You must use the backslash
(\) as an escape character before the dollar sign ($) in a
JSONATA expression, to prevent the substitution of value at
the command line based on environment variables. If not, the
command returns with a bad substitution error. Important: You must use the backslash
(\) as an escape character before the dollar sign ($) in a
JSONATA expression, to prevent the substitution of value at
the command line based on environment variables. If not, the
command returns with a bad substitution error. Note: Enclose the variable between carets
(^), and then enclose the entire string between double
quotation marks. If the variable contains a portion of a
path, ensure that the caret characters are not immediately
preceded by a backslash (\). Because the parser might
incorrectly interpret the \^ sequence as an
escape sequence and resolve it as a caret character. If
necessary, move the backslash into the definition of the
variable between carets.Restriction: If the variables in the job definition
are specified in ${variablename} format, the variable table
is not resolved. |
- noask
-
When you add the noask option as an argument, the agent does not ask for confirmation before it acts on each qualifying item.
Examples
- To submit the
test
jobs, run the following command:ocli plan sbj = test
- To submit a job with an
rptx4
alias and place the job in thereports
job stream withat
time of 5:30 PM, run the following command:ocli plan sbj = rjob4;alias=rptx4;into=reports;at=1730
- To submit the
test
job in theORDERS
job stream that is found in theONLINE
folder, run the following command:ocli plan sbj = test;into=/ONLINE/orders
- To submit the
txjob3
job on all workstations whose names begin withsite
, run the following command:ocli plan sbj = site@#txjob3;alias