start jobs based on renewable resources and dependencies
search cancel

start jobs based on renewable resources and dependencies

book

Article ID: 108899

calendar_today

Updated On:

Products

CA Workload Automation AE - Scheduler (AutoSys)

Issue/Introduction

box1, box2, box3, box4 and box5.


All boxes are triggered at same time but as based on defined renewable resources the first three boxes start while box 4 and 5 go into a resource pending state.  Once any one of the first three box complete, one of the two remaining boxes that are waiting for resources is allowed to run.

The goal is to have box 4 and 5 wait until box 1, 2 and 3 all complete
 

Environment

Workload Automation AE 

Resolution

Possible solutions:

1) 
insert_job: box4
condition: s(box1,0) & s(box2,0) & s(box3,0)
insert_job: box5
condition: s(box1,0) & s(box2,0) & s(box3,0)

The 0 represents a look-back, to ensure the job only runs if ALL three boxes (1,2 and 3) have run to SUCCESS since the last time box4 and box5 ran.

2) Another option is to adjust the resource requirements for box4 and box5 such that the would need all the resources that box1 2 and 3 would normally consume during their run.  Then box4 and box5 would wait until boxes 1, 2 and 3 are done but they would not execute at the same time. Meaning box4 would start while 5 would need to wait for box4 to complete
Example:
insert_job: box1 resources: (Wcredit,QUANTITY=1,FREE=A)
insert_job: box2 resources: (Wcredit,QUANTITY=1,FREE=A)
insert_job: box3 resources: (Wcredit,QUANTITY=1,FREE=A)
insert_job: box4 resources: (Wcredit,QUANTITY=3,FREE=A)
insert_job: box5 resources: (Wcredit,QUANTITY=3,FREE=A)