submit docommand
You can use the submit docommand command to schedule the start of a command as a task.
Overview
You can use the command to schedule the launch of a command as a task and if needed, with pre-defined conditions. You must have submit access for the task to run the command. To use the alias keyword for the task, make sure the task name in the database is specified along with the keyword. If you submit a single task, a workflow with the same name is created and submitted. The workflow contains only the task 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[;...]
Note: On the Windows operating system, when you
launch a submit docommand, you must enter the equal (=) sign as
'\='\. 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 task. You can use wildcard characters and in such cases, the task is launched on all the matching workstations. If you do not specify any workstation, the task 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 task and all the task rules are applicable. You must enclose the entire command in double quotation marks (").
- alias=name
- You can specify a unique name for the task 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 workflow instance to start a task. You can also provide the folder that contains the workflow definition.
Specify workflow instance as follows:
[[folder/]workstation#][folder/]jobstreamname([hhmm[ date]])
or [[folder/]workstation#]jobstream_id ;schedid
The optional parameters to customize the start of a task. 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 task. 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 task definition are specified in ${variablename} format, the
variable table is not resolved. |
Examples
- To enter a rm command with a
followsdependency, run the following command:ocli plan submit docommand = "rm apfile";follows sked3 - To enter a sort command with the alias
sortitand place the task in thereportsworkflow 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