Managing external follows dependencies for jobs and job streams
- Same day
- Considering
the job or job stream instances planned to run on the same day. In
this case you set the clause follows...sameday in the
object definition. Sameday matching criteria shows
a job stream named
Js1
which has an external follows dependency on the instance of the job streamJs2
that is scheduled to start on the same day. Below is an example of how to define the involved job streams.The job streamschedule Js2 schedule Js1 on everyday on everyday at 0700 at 1000 :job2 follows wk1#Js2 sameday end :job1 end Js1
in not launched until the job stream instance ofJs2
on the workstationwk1
completes successfully. - Closest preceding
- Using
the closest job or job stream instance (earlier or same time). The
job or job stream instance that HCL Workload Automation uses
to resolve the dependency is the closest in time before the instance
that includes the dependency. In this case you set the follows
... previous clause in the object definition. Closest preceding matching criteria shows a job stream named
Js1
which has an external follows dependency on the closest earlier instance of job streamJs2
. The time frame where the predecessor is searched is greyed out in the figure. Below is an example of how to define the involved job streams.The job streamschedule Js2 schedule Js1 on Th on Fr at 0700 at 1000 :job2 follows wk1#Js2 previous end :job1 end Js1
in not launched until the closest preceding job stream instance ofJs2
on the workstationwk1
completes successfully. - Within a relative interval
- Considering the job or job stream
instances defined in a range with an offset relative to the start
time of the dependent job or job stream. For example, from 25 hours
before the dependent job stream start time to 5 hours after the dependent
job stream start time. In this case you set the follows ... relative
from ... to ... clause in the object definition. Within
a relative interval matching criteria shows a job stream named
Js1
which has an external follows dependency on the job stream instance ofJs2
that starts with an offset of 2 hours with respect toJs1
. The job or job stream instance that HCL Workload Automation considers to resolve the dependency is the closest one within the relative time interval you chose. Below is an example of how to define the involved job streams.The job streamschedule Js2 schedule Js1 on everyday on everyday at 0900 at 1000 :job2 follows wk1#Js2 relative from 0200 to 0200 end :job1 end Js1
in not launched until the job stream instance ofJs2
on the workstationwk1
that runs in the 08:00 to 12:00 time frame completes successfully. - Within an absolute interval
- Using only the job or job stream instances defined in a range. For
example from today at 6:00 a.m. to the day after tomorrow at 5:59 a.m. In this case you set the
follows ... from ... to ... clause in the object definition. Within an absolute interval matching criteria shows a job stream named
Js2
which has an external follows dependency on the instance of job streamJs1
that is positioned in the preproduction plan between 7 a.m. and 9 a.m. The job or job stream instance that HCL Workload Automation considers to resolve the dependency is the closest one within the absolute time interval you chose. The time interval specifies the time of the day on which the interval starts and ends, either on the same day as the instance that include the dependency or on a day defined relative to that day.Below is an example of how to define the involved job streams.The job streamschedule Js1 schedule Js2 on everyday on everyday at 0800 at 1000 :job1 follows wk1#Js1 from 0700 to 0900 end :job2 end Js2
in not launched until the job stream instance ofJs1
on the workstationwk1
that runs in the 07:00 to 09:00 time frame on the same day completes successfully.
- HCL Workload Automation searches for the closest instance that precedes the depending job or job stream start time. If such an instance exists, this is the predecessor instance.
- If there is no preceding instance, HCL Workload Automation considers the correct predecessor instance as the closest instance that starts after the depending job or job stream start time.
job1
the successor job or
job stream is dependent on. External follows dependencies are identified between jobs and job streams stored in the database whose instances are added to the preproduction plan when the preproduction plan is automatically created or extended. Job and job stream instances submitted in production from the conman command line are written in the preproduction plan but they are not used to recalculate predecessors of external follows dependencies already resolved in the preproduction plan.
The scheduler classifies follows dependencies as internal when they are specified only by their job name within the job stream. It classifies them as external when they are specified in the jobStreamName.workstationName.jobName format.
When a job stream includes a job with a follows dependency that
shares the same job stream name (for example, job stream schedA
includes
a job named job6
that has a follows dependency on schedA.job2
),
the dependency is added to the plan as an external follows
dependency. Since Version 8.3, unlike in previous versions, because
the scheduler uses the sameday
matching criteria
to resolve external dependencies, dependencies originated in this
way are never added the first time the object is submitted.
- If the successor is carried forward when the production
plan is extended, the predecessor is included in the new production
plan and the dependency becomes current. A pending predecessor job
or job stream is marked with a
[P]
in theDependencies
column in the output of the conman showjobs and conman showschedules commands. - If the predecessor is not carried forward when the production plan is extended, the successor is
included in the new production plan, but the dependency becomes orphaned. This
can happen, for example, if, when extending the production plan, the successor is carried
forward and the pending predecessor is not added to the plan because it was flagged as
draft in the database. The orphaned dependencies are marked with a
[O]
in theDependencies
column in the output of the conman showjobs command. When dealing with an orphaned dependency you must verify if it can be released and, if so, cancel it.
When the product evaluates matching criteria to resolve external follows dependencies it compares the start times using local time if both job stream instances use the same timezone, or it uses UTC in case they use different timezones. However, if you set the EnLegacyStartOfDayEvaluation to yes, the product compares the local times of the job stream instances, regardless of whether the instances are defined on the same timezone or on different timezones.
External follows dependency resolution and status transition examples
This section includes examples for each of the four matching criteria described in the previous paragraphs. In all the examples, the start of day time (SOD) is set to 06:00 AM.
- Same day
- The job or job stream instance to be considered in resolving the dependency is the closest one on the same day in which the instance that includes the dependency is scheduled to run. In this example, two job streams,
Js1
andJs2
, each have one job. Job streamJs1
is scheduled to run every day at 08:00 and on Thursdays also at 07:00.Js1.Job1
runs at 09:00. Job streamJs2
has no time restrictions and is scheduled by default at the defined start of day time.Js2.Job2
is scheduled to run at 15:00 and has an external follows dependency on the closest earlier instance of the job streamJs1
running on the same day. The two job streams are defined in this way:
When the schedules are included in the plan, the sequence of graphics illustrate how the dependency is resolved:SCHEDULE MY_MASTER#JS1 ON RUNCYCLE RULE1 "FREQ=WEEKLY;BYDAY=TH" (AT 0700) ON RUNCYCLE RULE2 "FREQ=DAILY" (AT 0800) : MY_MASTER#JOB1 AT 0900 END SCHEDULE MY_MASTER#JS2 ON RUNCYCLE RULE2 "FREQ=DAILY;" FOLLOWS MY_MASTER#JS1.@ SAMEDAY : MY_MASTER#JOB2 AT 1500 END
- On Thursdays, the instance of
Js2
scheduled at 06:00 depends on the instance ofJs1
scheduled to run at 07:00. On any other day of the week,Js2
has a dependency on the instance ofJs1
scheduled at 08:00. Sameday matching criteria - Step 1: at Start of Day (SOD) on a Thursday shows the status of the two job streams in the plan at 06:00 (SOD) on Thursday: - At 09:00,
Js1.job1
starts andJs1
changes status.Js2.job2
is held until its scheduled time.Sameday matching criteria - Step 2: at 9:00 shows the status of the job streams in the plan at 09:00. - On Thursdays at 15:00,
Js2
changes to ready status andJs2.job2
starts. Sameday matching criteria - Step 3: at 15:00 shows the status of the two job streams in the plan at 15:00.
- On Thursdays, the instance of
- Closest preceding
- In this example, two job streams,
Js1
andJs2
, each have one job. The job inJs2
has an external follows dependency on the closest preceding instance of the job inJs1
. The two job streams are defined in this way:
Job streamSCHEDULE MY_MASTER#JS1 ON RUNCYCLE RULE1 "FREQ=DAILY;" (AT 0800) ON RUNCYCLE RULE2 "FREQ=WEEKLY;BYDAY=TH,FR" (AT 0900) : MY_MASTER#JOB1 END SCHEDULE MY_MASTER#JS2 ON RUNCYCLE RULE1 "FREQ=DAILY;" (AT 1200) FOLLOWS MY_MASTER#JS1.@ PREVIOUS : MY_MASTER#JOB2 AT 1500 END
Js1
runs every day at 0800 and on Thursdays and Fridays also at 0900. Job streamJs2
runs every day at 1200, and has an external dependency on the closest preceding instance ofJs1
. When the job streams are included in the plan, the sequence of graphics illustrates how the dependency is resolved:- Before 12:00 on Thursdays and Fridays, there are two instances
of
Js1.Job1
. Job streamJs2
has a dependency on the instance ofJs1.Job1
that is scheduled to run at 09:00, because it is the closest preceding in terms of time. Closest preceding matching criteria - Step 1: before 08:00 shows the status of the two job streams in the plan on Thursdays and Fridays. - On any other day of the week, the only instance of
Js1.Job1
in plan, is the one scheduled to run at 08:00. In this case,Js2
has a dependency on this instance. WhenJob1
completes successfully, the status ofJs2
becomes Ready. Closest preceding matching criteria - Step 2: at 08:00 on weekdays except Thursdays and Fridays shows the status of the two job streams in the plan on any other weekday except Thursdays and Fridays. - On Thursdays and Fridays at 09:00, the second instance of
Js1.Job1
completes successfully. Job streamJs2
changes to Ready.Js2.Job2
is held until its scheduled start time. Closest preceding matching criteria - Step 3: at 09:00 on Thursdays and Fridays shows the status of the two job streams in the plan. - At 15:00 the time dependency of
Js2.Job2
is satisfied andJob2
starts. Closest preceding matching criteria - Step 4: at 15:00 on every day shows the status of the two job streams in the plan at 15:00.
- Before 12:00 on Thursdays and Fridays, there are two instances
of
- In this second example, the difference between the use of
sameday
andclosest preceding
matching criteria in a plan is described. Job streamJs1
runs every Friday at 0900, while job streamJs2
andJs3
run every Saturday at 0900. The three job streams are defined in this way:
Job streamSCHEDULE ACCOUNTING#JS1 ON RUNCYCLE RULE1 "FREQ=WEEKLY;BYDAY=FR" : ACCOUNTING#JOB1 AT 0900 END SCHEDULE ACCOUNTING#JS2 ON RUNCYCLE RULE2 "FREQ=WEEKLY;BYDAY=SA" FOLLOWS ACCOUNTING#JS1.@ PREVIOUS : ACCOUNTING#JOB1 AT 0900 END SCHEDULE ACCOUNTING#JS3 ON RUNCYCLE RULE2 "FREQ=WEEKLY;BYDAY=SA" FOLLOWS ACCOUNTING#JS1.@ : ACCOUNTING#JOB1 AT 0900 END
Js2
has an external dependency on the closest preceding instance ofJs1
, which is resolved as described in the previous example. Job streamJs3
is defined withsameday
matching criteria, so it does not have any dependency on job streamJs1
, becauseJs1
is not defined to run on the same day asJs2
.
- Within a relative interval
In this example, the job or job stream instance considered to resolve the dependency is the closest one in a time interval of your choice, which is defined relatively to the time when the instance that includes the dependency is scheduled to run. Job stream
Js1
is scheduled to run every day at 15:00 and on Thursdays also at 08:00.Js2
is scheduled to run every day at 13:00 and on Thursdays also at 06:00, because no specific time is defined in the run cycle, it is scheduled at start of day time.Js2
uses the relative interval criteria (-04:00 to +04:00) to determine which instance is used to solve the dependency. The interval is based on the time the job stream enters the plan. The job streams are defined as follows:
At plan creation time, conman showjobs produces the following output:SCHEDULE MY_MASTER#JS1 ON RUNCYCLE RULE1 "FREQ=WEEKLY;BYDAY=TH" (AT 0800) ON RUNCYCLE RULE2 "FREQ=DAILY" (AT 1500) : MY_MASTER#JOB1 END SCHEDULE MY_MASTER#JS2 ON RUNCYCLE RULE3 "FREQ=WEEKLY;BYDAY=TH" ON RUNCYCLE RULE2 "FREQ=DAILY;" (AT 1300) FOLLOWS MY_MASTER#JS1.@ RELATIVE FROM -0400 TO 0400 : MY_MASTER#JOB2 AT 1300 END
Relative Interval matching criteria - at start of day on Thursday shows the status of the job streams in the plan at start of day on Thursday.The instance of%sj @#@ (Est) (Est) CPU Schedule SchedTime Job State Pr Start Elapse RetCode Deps MY_MASTER#JS1 0800 11/13 ******** READY 10 (00:06) JOB1 HOLD 10 (00:06) MY_MASTER#JS1 1500 11/13 ******** READY 10 (00:06) JOB1 HOLD 10 (00:06) MY_MASTER#JS2 0600 11/13 ******** HOLD 10 JS1(0800 11/13/09).@ JOB2 HOLD 10(13:00) MY_MASTER#JS2 1300 11/13 ******** HOLD 10(13:00) JS1(1500 11/13/09).@ JOB2 HOLD 10(13:00)
Js2
scheduled at 06:00 has a dependency onJs1.job1
which is scheduled at 08:00, within the relative interval based on the scheduled time (06:00).Js2.job2
depends on the instance ofJs1.job1
within the relative interval based on the scheduled time (13:00). When the instance ofJs1.job1
starts at 08:00, the status ofJs2
changes to Ready. From this point onwards, the sequence in which the job streams and jobs run follows the typical process.- Within an absolute interval
- In this example, the job or job stream instance considered to resolve the dependency is the closest one in a fixed time interval of your choice. The time interval specifies the time of day on which the interval begins and the time of day on which it ends, either on the same day as the instance that includes the dependency, or on a day defined relatively to that date.
Js1
is scheduled to run every day at 08:00 and on Thursdays also at 07:00. JobJs1.job1
is scheduled to run at 09:00. Job streamJs2
is scheduled every day at 10:00 and on Thursdays also at start of day (06:00) and has a dependency onJs1
based on the absolute interval occurring on the same day between 06:00 and 11:00. The job streams are defined as follows:
At plan creation time, conman showjobs produces the following output:SCHEDULE MY_MASTER#JS1 ON RUNCYCLE RULE1 "FREQ=WEEKLY;BYDAY=TH" (AT 0700) ON RUNCYCLE RULE2 "FREQ=DAILY" (AT 0800) : MY_MASTER#JOB1 AT 0900 END SCHEDULE MY_MASTER#JS2 ON RUNCYCLE RULE3 "FREQ=WEEKLY;BYDAY=TH" ON RUNCYCLE RULE2 "FREQ=DAILY;" (AT 1000) FOLLOWS MY_MASTER#JS1.@ FROM 0600 TO 1100 : MY_MASTER#JOB2 AT 1300 END
Absolute interval matching criteria - at start of day on Thursday shows the status of the job streams in the plan at start of day on Thursday.At 09:00,%sj @#@ (Est) (Est) CPU Schedule SchedTime Job State Pr Start Elapse RetCode Deps MY_MASTER#JS1 0700 11/13******** READY 10 (00:06) JOB1 HOLD 10(09:00)(00:06) MY_MASTER#JS1 0800 11/13 ******** READY 10 (00:06) JOB1 HOLD 10(09:00)(00:06) MY_MASTER#JS2 0600 11/13 ******** HOLD 10 JS1(0700 11/13/09).@ JOB2 HOLD 10(15:00) MY_MASTER#JS2 1000 11/13 ******** HOLD 10(10:00) JS1(0800 11/1309).@ JOB2 HOLD 10(15:00)
Js1.job1
starts, and at 10:00 the dependency is released andJs2
becomes ready. From this point onwards, the sequence is the same as described in the previous matching criteria.