Managing a job in job stream from the Orchestration CLI
In this topic you can find the syntax to add a job to a job stream definition.
In a HCL Universal Orchestrator distributed environment, jobs can be defined either independently from job streams or within a job stream definition.
Syntax
# comment job_name [as job_alias] [outcond joboutputcondition interval seconds] [{at time [timezone|tz tzname] [+n day[s]] | schedtime time [timezone|tz tzname] [+n day[s]]}] [until time [timezone|tz tzname] [+n day[s]] [onuntil action] [deadline time [timezone|tz tzname] [+n day[s]] [onlate action] ] [maxdur time | onmaxdur action] [mindur time | onmindur action] [follows {[workstation#]jobstreamname{.jobname @} [previous| sameday|relative from [+|-] time to [+|-] time | from time [+|-n day[s]] to time [+|-n day[s]] ]} ][if <condition> [| <condition>...]] [,...]] [...] [join condition_name [number | numconditions | all] of description "..." ..... endjoin] [confirmed] [nop]
- To add a job already defined in the database, use the following syntax: [[folder/]workstation#][folder/]jobname.
- To add a new job that does not exist in the database, define it using the same syntax of the job definition: Job definition syntax.
You can edit job definitions from a job stream definition; any change is also applied to
the job definitions stored in the database. For example, if you edit the job definition of
job_a
in the js_a
job stream definition, and
job_a
is also used in the js_b
job stream, the
definition of job_a
in js_b
changes accordingly.
Arguments
The following List of scheduling keywords table contains a brief description of the job in job stream definition keywords.
Keyword | Description |
---|---|
at | Using this keyword, you can define the earliest time in which jobs can run. When you define it in a run cycle, the keyword specifies the earliest time jobs can run for that specific run cycle. For more information, see:Time restriction keywords |
comment | Using this keyword, you can include comments in the definition of a job. The line must begin with a number sign (#). In a job definition, comments can be added immediately after the line with the schedule keyword. |
deadline | Using this keyword, you can specify the time within which jobs should complete. When you define it in a run cycle, the keyword specifies the time within which a job should complete in that specific run cycle. For more information, see:Time restriction keywords. |
description | Using this keyword, you can add a description of the job. The content must be enclosed within double quotation marks. To use quotation marks ("), place a backslash (\) before. |
folder|fol | Using this keyword, you can specify the item folder. |
follows | Using this keyword, the job runs only after the predecessor jobs have successfully completed, or one or more output conditions have been satisfied. For more information, see: Dependency keywords. |
join | Using this keyword, you can define sets of conditional dependencies job.Dependency keywords. |
maxdur | Using this keyword, you can specify the maximum length of time a job can run. For more information, see:Time restriction keywords. |
mindur | Using this keyword, you can specify the minimum expected time for the job to complete. For more information, see:Time restriction keywords. |
nop | Using this keyword, you can specify that the job must not run when the plan runs. For more information, see: nop |
onlate | Using this keyword, you can define the action to take on a job in the job stream when the deadline of the job has expired. For more information, see:Time restriction keywords. |
onuntil | When the until time has been reached, you can use this keyword to define the action to take on the job. For more information, see:Time restriction keywords. |
schedtime | Using this keyword, you can specify the time of the job stream in the plan to determine predecessors and successors. For more information, see:Time restriction keywords. |
timezone | tz | Using this keyword, you can specify the time zone to use for the start time. For more information, see:Time restriction keywords. |
until | Using this keyword, you can define the latest start time of a job. If you specify it in a run cycle, it defines the latest start time for a job for that specific run cycle. It is mutually exclusive with the jsuntil keyword. For more information, see:Time restriction keywords. |
For the other keywords refer to Managing a job definition from the Orchestration CLI.
Comments
When you define a job in a job stream definition, the new job definition is added to the database, and then it can be referenced from other job streams.
When you change the name of a job defined in a job stream version, the new name is applied in all the other versions of the job stream. Internal and external job stream associations remain consistent when you apply changes. For more information about job stream versions, see: Creating a job stream definition from the Orchestration CLI
-
The following example defines a job stream that contains an executable job:
After saving, the definition is displayed as follows:SCHEDULE JS1 : JOB1 TASK <?xml version="1.0" encoding="UTF-8"?> <jsdl:jobDefinition xmlns:jsdl="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdl" xmlns:jsdle="http://www.ibm.com/xmlns/prod/scheduling/1.0/jsdle"> <jsdl:application name="executable"> <jsdle:executable interactive="false"> <jsdle:script>dir</jsdle:script> </jsdle:executable> </jsdl:application> </jsdl:jobDefinition> DESCRIPTION "Sample jsdl Job Definition" END
$jobstream JOBSTREAM /WS_AGT_0#/JS1 : /WS_AGT_0#/JOB1 END ES 2 (JobStream con Job già esistenti e definiti) schedule WS_AGT_1#JSWJ: WS_AGT_0#job1 WS_AGT_0#job2 follows WS_AGT_0#job1 end
- The following job stream definition contains already existing and defined
jobs:
After saving, the definition is displayed as follows:schedule WS_AGT_1#JSWJ: WS_AGT_0#job1 WS_AGT_0#job2 follows WS_AGT_0#job1 end
$jobstream JOBSTREAM /WS_AGT_0#/BKUP : /WS_AGT_0#/JOB1 /WS_AGT_0#/JOB2 FOLLOWS JOB1 END