AutoSys Workload Automation

 View Only
  • 1.  Question on multiple dependencies : Job and Date

    Posted Mar 21, 2016 07:54 PM

    Hello,

     

    If this is not the appropriate place for the question, please redirect me.

    We are using `autosys` r11. There are two autosys jobs : Job A and Job B.

    • Job A runs everyday.
    • Job B depends on Job A and should run only on some day(s) after Job A has successfully finished.

     

    I have tried `date_conditions: 1` and job condition ( s(Job A) ), but it seem to trigger 'job B' before 'job A' is completed.

    What is the right way of doing this.

     

    Thanks,



  • 2.  Re: Question on multiple dependencies : Job and Date

    Posted Mar 21, 2016 08:19 PM

    Try:

     

    insert_job: jobB

    ...

    condition: s(JobA)

    date_conditions: y

    run_calendar: <calendar that contains the days on which jobB can run>

     

    you can optionally add a lookback or other additional conditions to further control when the job runs.



  • 3.  Re: Question on multiple dependencies : Job and Date

    Posted Mar 21, 2016 08:40 PM

    Thanks for the response.

     

    To make myself clear,

     

    In my tests, Job B's job definition looks like :

     

    date_conditions: 1

    days_of_week: mo,we,th

    start_times: "14:00"

    condition: s(Job A)

     

    which looks similar to what you proposed except that my version uses the days of week condition. (Or is there any implicit behavioural difference in case of run_calendar that I'm not aware of)

     

    The trouble with my case is, Job B starts before Job A finishes. Which is something I didn't expect nor understand. (Is that the expected behaviour?)

    But if Job A fails, Job B doesn't start.



  • 4.  Re: Question on multiple dependencies : Job and Date
    Best Answer

    Posted Mar 21, 2016 11:11 PM

    Yes, the days_of_week condition is fine also. In terms of jobB starting before jobA finishes, perhaps jobB is kicking off based on the previous success status of jobA once the other starting conditions are met (mo,we,th & 14:00). If that is the case you might want to add a lookback to the condition. Hard to say for certain without seeing both job definitions and the scheduler log file.

    If you would like help analyzing why jobB is running when it is, feel free to open a support case. Be sure to upload the scheduler log and both job definitions to the case.



  • 5.  Re: Question on multiple dependencies : Job and Date

    Posted Mar 22, 2016 12:08 AM

    Thanks again.

     

    I don't have access to scheduler log yet, I'll open a case once I get my hands on it. (I suspect it'd take a while for the access)

    Until then I can only experiment with the jobs itself.

     

    The job definitions :

     

    Job A

     

    permission: gx,ge,wx

    date_conditions: 1

    days_of_week: all

    start_times: "14:00"

    alarm_if_fail: 1

     

    Job B

     

    permission: gx,ge,wx

    date_conditions: 1

    days_of_week: mo,we,th

    start_times: "14:00"

    condition: s(Job A)

    alarm_if_fail: 1

     

    1. Is there something odd/wrong in it.

    2. You were advising to add something like s(Job A, 12.00)

    • I'm happy to try that, but could you help me understand why I require that.
    • Job A runs only once a day, I would've expected to Autosys to clear any state within that time.


  • 6.  Re: Question on multiple dependencies : Job and Date

    Posted Mar 22, 2016 12:15 AM

    Hi Shyam,

     

    I believe this is what is happening in your case:

     

    JobA is scheduled to run at 16:00 daily ( or if you have a run_calendar might run after JobB : My assumption)

    JobB is scheduled to run at 14:00 only on Mo/We/Th

     

    Assuming today is Wednesday

    JobA has already run successfully on Tuesday 16:00

    JobB will run on Wednesday 14:00 looking at JobA which ran to SUCCESS on Tuesday.

     

    If you don't want this to happen, you should use lookback feature in the condition, which says JobB should run only if JobA has run to SUCCESS in last hour or as configured.

     

    Hope this helps.

     

    Thanks,

    Ahmed Khan



  • 7.  Re: Question on multiple dependencies : Job and Date

    Posted Mar 22, 2016 12:23 AM

    Thanks Ahmed.

    Is there a default "lookback" value.

    If you can point me to any relevant doc/spec, I'll be happy as well.



  • 8.  Re: Question on multiple dependencies : Job and Date

    Broadcom Employee
    Posted Mar 22, 2016 09:39 AM

    Hi Shyam,

    Here is the documentation Look-Back Dependencies

     

    Regards,

    Kishore Kumar Udathaneni



  • 9.  Re: Question on multiple dependencies : Job and Date

    Posted Mar 22, 2016 08:49 PM

    Thanks, Looks like I'm getting a 403 (Forbidden) for the doc link.

     

    Do you know what permissions I require to access it.



  • 10.  Re: Question on multiple dependencies : Job and Date

    Posted Mar 25, 2016 12:42 AM

    Hi Shyam,

    Please log in using your CA Support Online credentials.

     

    Regards,
    Sumitha