no, lookback is not appropriate in this case. I'd add a sleep job between job2 and job3
AutoSys job condition with success and delay
-
17-06-2023 - |
题
I have three jobs in a box job and want to schedule the three jobs to run one after another. job1, then job2 when job1 is in success, then job3 when job2 is in success. I also want to add a timing condition and have job2 wait 10 mins after job1 succeeded and similary for job3 to wait 10 mins after job2 succeeded. Currently I have this:
job2:
condition: s(job1)
job3:
condition: s(job1) & s(job2)
I am not sure how to add the 10 mins delay. Would something like this work?
condition: s(job1,00.10) & s(job2,00.10)
Thanks!
解决方案
其他提示
I use a file watcher to achieve this. See the jil below which "Sleeps" for 30 seconds...
/* ----------------- T4useBJ_CHRIS_SLEEP_TEST ----------------- */
insert_job: T4useBJ_CHRIS_SLEEP_TEST job_type: BOX
owner: administrator
permission: gx,wx
date_conditions: 0
description: "Sleep test"
alarm_if_fail: 0
/* ----------------- T4useEXT_CHRIS_SLEEP_TEST ----------------- */
insert_job: T4useEXT_CHRIS_SLEEP_TEST job_type: CMD
box_name: T4useBJ_CHRIS_SLEEP_TEST
command: copy nul D\:\hrbatch\test\sleep_test.txt /* use touch on UNIX */
machine: trent4
owner: administrator
permission: gx,wx
date_conditions: 0
description: "Trigger File Watcher"
std_out_file: "d:\hrbatch\Test\%AUTO_JOB_NAME%.%AUTORUN%.out"
std_err_file: "d:\hrbatch\Test\%AUTO_JOB_NAME%.%AUTORUN%.err"
alarm_if_fail: 0
/* ----------------- T4useFW_CHRIS_SLEEP_TEST ----------------- */
insert_job: T4useFW_CHRIS_SLEEP_TEST job_type: FW
box_name: T4useBJ_CHRIS_SLEEP_TEST
machine: trent4
owner: administrator
permission: gx,wx
date_conditions: 0
condition: success(T4useEXT_CHRIS_SLEEP_TEST)
description: "Look for sleep_test.txt file"
alarm_if_fail: 0
watch_file: "d:\hrbatch\test\sleep_test.txt"
watch_interval: 30
/* ----------------- T4useDEL_CHRIS_SLEEP_TEST ----------------- */
insert_job: T4useDEL_CHRIS_SLEEP_TEST job_type: CMD
box_name: T4useBJ_CHRIS_SLEEP_TEST
command: del D\:\hrbatch\test\sleep_test.txt
machine: trent4
owner: administrator
permission: gx,wx
date_conditions: 0
condition: success(T4useFW_CHRIS_SLEEP_TEST)
description: "Remove trigger file"
std_out_file: "d:\hrbatch\Test\%AUTO_JOB_NAME%.%AUTORUN%.out"
std_err_file: "d:\hrbatch\Test\%AUTO_JOB_NAME%.%AUTORUN%.err"
alarm_if_fail: 0
不隶属于 StackOverflow