Need help on autosys dependencies

65 views
Skip to first unread message

rishi raj

unread,
Apr 8, 2020, 7:56:47 AM4/8/20
to AutoSys
I have a requirement in autosys and i am unable to set it.
Scenario: -
We have three jobs A,B and C.

Triggering condition for job C.
(1) If A and B succeeds, C should trigger immediately
(2) If either of A or B succeeds, C should wait for 48 hours before triggering. If in case within 48 hours one of the jobs A or B succeeds, C should trigger but in case only one has suceeded and other has not in 48 hours then C should only trigger after 48 hours.

Job C is weekly job.

daniel.shannon

unread,
Apr 8, 2020, 9:24:54 AM4/8/20
to AutoSys
Simple example:

insert_job: abc_box  job_type: b

insert_job: ab_box  job_type: b
box_name: abc_box
box_success: (S(ab_a) & S(ab_b)) | S(ab_wait)

insert_job: ab_a
box_name: ab_box
machine: localhost
command: as_test -e0 -t5

insert_job: ab_b
box_name: ab_box
machine: localhost
command: as_test -e1 -t5

insert_job: ab_wait
box_name: ab_box
machine: localhost
command: as_test -t 120
condition: F(ab_a) or F(ab_b)

insert_job: ab_c
box_name: abc_box
machine: localhost
command: as_test -t2
condition: S(ab_box)


If you don't like the "sleep" done by job ab_wait, you could change it to generate a future sendevent that was calculated for 48 hours later that issued a STARTJOB/FORCE_STARTJOB event against job C (ab_c).
Reply all
Reply to author
Forward
0 new messages