submit job

You can use the submit job command option to start a task.

Overview

You can use the submit job command to start a task with pre-defined conditions. To run the command you must have submitdb access to the task. To use the alias keyword for the task, make sure to specify the task name in the database by including 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 command line options

Before you run the command, you must specify the details of the command line options such as task name and required permissions. There are mandatory and optional parameters which you can use to schedule the start of a task. 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 task on. You can use wildcard characters. If you use wildcards, the task starts on all matching workstations. If you do not specify a workstation, the task runs on the default workstation.
jobname
You must specify the name of the task to start.

You must specify the name of the task which you want to launch. You can use wildcard characters. I you use wildcard characters all matching tasks are submitted. If the task is already in plan, and submitted into the same workflow, you must use the alias keyword to assign a unique name.

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 includes the first 5 alphanumeric characters followed by a random ten digit-number.
into=[folder/]jobstream_instance
Specify the workflow instance the task will be launched into. You can also provide the folder that contains the workflow definition.

Select the workflow instance by entering one of the following commands:

  • [[folder/]workstation#][folder/]jobstreamname([hhmm[ date]])
  • [[folder/]workstation#]jobstream_id ;schedid
joboption
You can customize the start of a task with optional parameters. You can specify one or more of the options in the following table.
Table 1. 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 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.
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

  1. To submit the test tasks, run the following command:
    ocli plan sbj = @#test
  2. To submit a task with an rptx4 alias and place the task in the reports workflow with at time of 5:30 PM, run the following command:
    ocli plan sbj = @#rtask4;alias=rptx4;into=reports;at=1730
  3. To submit the test task in the ORDERS workflow that is found in the ONLINE folder, run the following command:
    ocli plan sbj = @#test;into=/ONLINE/orders
    
  4. To submit the txjob3 task on all workstations whose names begin with site, run the following command:
    ocli plan sbj = site@#txjob3;alias