AutoSys Workload Automation

 View Only
  • 1.  Job related queries

    Posted Aug 24, 2020 05:32 PM
    Dear all,

    Can you help me with a solution for the below scenario.

    If  two files File 1 and File 2 are arriving at the same time  (File 1 ->Job A) , (File 2 ->Job B). Job A should trigger first . Job B should wait till  Job A completes and then it should trigger .

    ------------------------------
    Best regards
    Rajadurai
    ------------------------------


  • 2.  RE: Job related queries

    Posted Aug 25, 2020 04:07 AM
    Hi,

    A job dependency may help.

    Best regard.
    José


  • 3.  RE: Job related queries

    Posted Aug 25, 2020 12:42 PM
    I'd configure something like (thinking through the scenario, not tested):
    file_watch1 to look for file1
    file_watch2 to look for file2
    Job A dependent on file_watch1
    Job B dependent on file_watch2 and success of Job A

    I'd wrap the jobs up in a Box scheduled to start before file is expected so the jobs are placed in Activated state versus Success from last run.

    if both files are received at same time then both file watch jobs would complete and Job A will start, once completed Job B will start.


  • 4.  RE: Job related queries

    Posted Aug 26, 2020 04:41 AM

    Unless your jobs are in a box I would also add a lookback condition.

    On the first run of the job, JOB_B would have to wait for JOB_A. However, they both remain in a success state until their next run, at which point JOB_B will only be looking for JOB_A to be in success. So if in the second run of the jobs, JOB_B's file arrives first, it will run first as JOB_A will still be in success from its last run. Adding a lookback condition of 0 ensures that JOB_B will wait for JOB_A to have completed more recently ​than itself.

    So the dependency on JOB_B would be s(JOB_A,0)



    ------------------------------
    Workload Automation Engineer
    BPDTS
    ------------------------------