submit docommand
You can use the submit docommand command to schedule the start of a command as a job.
Overview
You can use the command to schedule the launch of a command as a job and if needed, with pre-defined conditions. You must have submit access for the job to run the command. To use the alias keyword for the job, make sure the job name in the database is specified along with 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 commandline options
ocli plan submit docommand | sbd [folder/]workstation#] "cmd" alias[=name] ;[into=[[folder/]workstation#] [jobstream_id;schedid |[folder/]jobstreamname([hhmm[date])]] ;[joboption[;...]
![](../../ngwindows.jpg)
'\='\
. hello
issue the following
command:%sbd "set var1\"=\"hello"
You can add parameters according to the specific results you want to achieve. The only mandatory parameter is cmd. The details required with each parameters are as follows:
- workstation
- Specify the name of the workstation on which you want to run the job. You can use wildcard characters and in such cases, the job is launched on all the matching workstations. If you do not specify any workstation, the job will run on the default workstation.
- cmd
- You must specify a valid command and can use up to 255 characters. The command is treated as a job and all the job rules are applicable. You must enclose the entire command in double quotation marks (").
- 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 use the first 5 alphanumeric characters followed by a random ten digit number.
- into=[folder/]jobstream_instance
- Specify the jobstream instance to start a job. You can also provide the folder that contains the job stream definition.
Specify job stream instance as follows:
[[folder/]workstation#][folder/]jobstreamname([hhmm[ date]])
or [[folder/]workstation#]jobstream_id ;schedid
The optional parameters to customize the start of a job. You can specify one or more of the options in the following table.
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 |
logon |
You can specify the user name to run the job. |
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. |
Examples
- To enter a rm command with a
follows
dependency, run the following command:ocli plan submit docommand = "rm apfile";follows sked3
- To enter a sort command with the alias
sortit
and place the job in thereports
job stream with an at time of5:30 p.m.
, run the following command:ocli plan sbd "sort < file1 > file2";alias=sortit;into=reports;at=1730
- To enter chmod commands on all workstations with names that
begin with "site", run the following
command:
ocli plan sbd site@#"chmod 444 file2";alias