您可以使用Autosys Job Dependencies功能来实现此目的。在JOB属性中定义“condition:“s(upstream job name)”,这将使作业等待上游作业完成。要确保只有在当天运行时才会发生依赖关系,您可以使用start_time(HH:MM)或days_of_week属性。具体实现方法如下所示:
/* Job A - upstream job */ insert_job: A job_type: c command: my_command_A machine: my_machine owner: my_owner permission: gx date_conditions: 1 days_of_week: all start_times: "12:00" description: "Upstream job A"
/* Job B - downstream job with dependency on Job A */ insert_job: B job_type: c command: my_command_B machine: my_machine owner: my_owner permission: gx date_conditions: 1 days_of_week: all start_times: "13:00" condition: s(A) description: "Downstream job B with upstream dependency"