adddep job

You can use the adddep command to add dependencies to a job.

Overview

To add the dependencies to a job, you must have adddep access to the job. For more information about security access roles, see Security role definition.

Syntax and command line options

Before you run the command, you must specify options such as job name, dependencies, and required permissions. you can enter the command as follows:

adddep job | adj = <jobselect> <dependency> <noask>

You can add the dependency according to the specific results you want to accomplish. The details that are required with each parameters are as follows:

Jobselect

Specify the job to update, by means of attributes and qualifiers.

For example, WA_AGT_0#JOB_STREAM.JOB.

Dependency

Specify the type of dependency and add at least one to complete the command. The following table lists the type of dependencies that you can use to create the command line.

\Command Reference
at= time[timezone | tz][+n day[s] | [mm/dd | mm/dd[/yy]] at
deadline= time [timezone | tz][+n day[s] | [mm/dd | mm/dd[/yy]]] deadline
follows=[workstation#]{jobstreamname[time [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
confirmed confirmed
noask

When you add the option as an argument the agent will not ask for confirmation before taking action on each qualifying job.

Notes:
  1. If you add twice a dependency on a job stream to a job, both dependencies are treated.
  2. When using the deadline keyword, ensure the bm check deadline option is set to a value higher than 0 in the localopts configuration file on the workstation you are working on. You can define the bm check deadline option on each workstation on which you want to be aware of the deadline expiration, or, if you want to obtain up-to-date information about the whole environment, define the option on the master domain manager. Deadlines for critical jobs are evaluated automatically, independently of the bm check deadline option.

    For more information about the bm check deadline option, refer to Setting local options.

  3. If you add a dependency to a job after it has completed, it is not evaluated. However, any subsequent reruns of the job will process the dependency correctly.
Restictions:
  1. Wildcard characters are not permitted.
  2. If you do not specify a value for priority, the job reverts to its original scheduled priority.
  3. If you do not specify a workstation in follows, needs, or opens, the default is the workstation on which the job runs.

Examples

  1. To add an external follows dependency on job JOB022 in job stream MLN#/FOLDER1/SCHED_02(0600 02/24/18) from JOBA in job stream MLN#/FOLDER2/NEW_TEST(0900 02/19/18), run the following command:
    adj=MLN#/FOLDER2/NEW_TEST(0900 02/19/18).JOBA ; 
    follows MLN#/FOLDER1/SCHED_02(0600 02/24/18).JOB022
  2. To stop the job PAYROLL_JOB in job stream ABSENCES_JS when it is completed more than 9 hours and 1 minute, run the following command:
    adj DUBAI#ABSENCES_JS.PAYROLL_JOB ;
    maxdur=901 ;onmaxdur kill