AutoSys Workload Automation

 View Only
Expand all | Collapse all

look back condition not satisfied even if it is Success

  • 1.  look back condition not satisfied even if it is Success

    Posted Apr 22, 2023 12:24 AM

    Hi there,
    FYI,  I am new to autosys.
    I am trying to use success(job_a, 01.00) condition, which I believe according to docs check if job_a is successsfull within the last hour or not right? 
    But in autosys workload automation. It is always showing condtion not satisfied. May I know why? Does it depends on any other things. I tested it by manually changing the status of job_a to Success. But in successor job the condition never satisfied.



  • 2.  RE: look back condition not satisfied even if it is Success

    Posted Apr 23, 2023 04:31 AM

    Hi,

    You are right, job should start if joba has gone to success within the last hour

    Does your job have any other starting condition?

    Best regards
    José




  • 3.  RE: look back condition not satisfied even if it is Success

    Posted Apr 24, 2023 12:21 PM

    Greetings Sagar,  
    You are correct in the assumption that the job should be triggered without any other conditions if jobA has gone to success only within that 1 hour;  if  JobA was to go to success at 10:00 am then the condition would be active from 10 to 11 then the condition would turn false again after 11AM.  Maybe it is just me but when I was looking at your condition I see a space between the JobA, 01.00  * copied from your message  success(job_a, 01.00) condition  **  If you are putting a space between then you have an issue on that.  If it looks like  s(job_a,01.00)  then the job which has that condition should be working.  What version of AutoSys are you running?   Have you tried to just validate that the condition of lookback for a new success works;  s(job_a,0)  just to ensure that it is working?  Is there any other conditions on the event you are trying to trigger?  If all that is there then please provide all the JIL to look at so that it is easier to trouble shoot. 

    Good luck! 
       Clark  (ca the other one)  




  • 4.  RE: look back condition not satisfied even if it is Success

    Posted Apr 24, 2023 06:04 PM

    My Jobs are somewhat like this.. There may be typo while typing here but just think there are none in my original jobs. When I use s(Job_A,0) It is working fine. Only when I add time it doesn't do what I want.

    Box:
    inert_job: Job_Box
    owner: sagar
    alarm_if_fail: n
    alarm_if_terminated:y
    days_of_week:mo,tu,we,th.fr.sa.su
    start_times: "13:00"

    Job A:
    insert_job: Job_A
    job_type: cmd
    description: check file gen
    machine: machine1 
    owner: sagar 
    box_name: Job_Box 
    max_run_alarm: 45
    alarm_if_fail: n
    alarm_if_terminated: y
    n_retrys: 10
    date_conditions: y
    run_window: "13:00-13:45"
    days_of_week: mo,tu,we,th,fr,sa,su
    start_times: 13:00"
    profile: /path/bin/profile.sh
    send_notification: n
    std_out_file: $STDOUT
    std err_ file: $STDERR 
    command: echo "success"


    Job B:
    insert_job: Job_B
    job_type: cmd
    description: check file gen fin
    machine: machine1 
    owner: sagar 
    box_name: Job_Box 
    command:s(Job_A,01.00)
    max_run_alarm: 45
    alarm_if_fail: n
    alarm_if_terminated: y
    n_retrys: 10
    date_conditions: y
    run_window: "13:45-14:30" 
    days_of_week: mo,tu,we,th,fr,sa,su
    start_times: 13:45"
    profile: /path/bin/profile.sh
    send_notification: n
    std_out_file: $STDOUT
    std err_ file: $STDERR 
    command: echo "success"




  • 5.  RE: look back condition not satisfied even if it is Success

    Posted Apr 24, 2023 07:58 PM

    Sagar,
    Your JIL definitions are riddled with typos.  AutoSys is very unforgiving when it comes to things not being 100% accurate.  Compare these simplified definitions line-by-line with what you have:

    insert_job: Job_Box1
    job_type: box
    owner: sagar
    date_conditions: y
    days_of_week: mo,tu,we,th,fr,sa,su
    start_times: "13:00"
    term_run_time: 45
     
    insert_job: Job_A
    job_type: cmd
    description: do file gen
    machine: machine1
    owner: sagar
    box_name: Job_Box1
    max_run_alarm: 45
    profile: /path/bin/profile.sh
    send_notification: n
    std_out_file: $STDOUT
    std_err_file: $STDERR
    command: echo "Job A success"
     
    insert_job: Job_Box2
    job_type: box
    owner: sagar
    date_conditions: y
    days_of_week: mo,tu,we,th,fr,sa,su
    start_times: "13:45"
    term_run_time: 45
    insert_job: Job_B
    job_type: cmd
    description: check file gen finish
    machine: machine1
    owner: sagar
    box_name: Job_Box2
    condition: s(Job_A,01.00)
    profile: /path/bin/profile.sh
    send_notification: n
    std_out_file: $STDOUT
    std_err_file: $STDERR
    command: echo "Job B success"



  • 6.  RE: look back condition not satisfied even if it is Success

    Posted Apr 25, 2023 05:43 AM

    I mentioned there may be typos here while typing but there is none in the original one.
    Can you tell me why did you add second job inside another box? Apart from that I don't see any difference.




  • 7.  RE: look back condition not satisfied even if it is Success

    Posted Apr 25, 2023 12:46 PM

    Lookback assumes the original job changed its Status sometime BEFORE the conditioned job begins.  If both jobs are in the same box, they both Activate at the same time; there is no "sometime before".  It's similar to having the two jobs floating without a Box; as I mentioned, lookback doesn't do anything useful in that configuration.




  • 8.  RE: look back condition not satisfied even if it is Success

    Posted Apr 25, 2023 05:38 PM

    Even if that's the case. My original jobs are in different boxes, the box is running and the Job has success status and the dependent successor job is activated. Still the condition is false. It's not solving the problem.




  • 9.  RE: look back condition not satisfied even if it is Success

    Posted Apr 26, 2023 01:25 AM

    Sagar, you should try a proper test:

    1. Make sure Job_Box1 and Job_A have not run in the past hour
    2. Force-start Job_Box2
    3. Job_B should be Activated but not be Running, since there's been no change of Status to Job_A in the past hour
    4. Kill Job_Box2.  Neither Job_Box2 or Job_B should be Activated or Running.
    5. Force-start Job_Box1.  Job_A should get a new Success status.
    6. Wait for a few minutes
    7. Force-start Job_Box2.  Job_B should be Running or already be Success, since Job_A had a change to Success in the past hour.



  • 10.  RE: look back condition not satisfied even if it is Success

    Posted Apr 26, 2023 08:58 AM

    Do a proper test:

    1. Job_Box1 should not have run in the past hour.
    2. Force-start Job_Box2.
    3. Job_B should not start since it can't find a new Success status on Job_A.
    4. Kill Job_Box2. Job_Box2 & Job_B should no longer be Running or Activated.
    5. Force-start Job_Box1.
    6. Job_A should complete as Success.
    7. Wait a few minutes.
    8. Now force-start Job_Box2 again.
    9. Job_B should immediately start and complete since Job_A changed status within the past hour.



  • 11.  RE: look back condition not satisfied even if it is Success

    Posted Apr 26, 2023 08:48 AM

    Sagar, it is difficult to debug your JIL with the typos as it is impossible to see what you actually have to help you because we can't determine if the typo is only here or your actual.   Common practice is instead of typing the JIL here, copy the actual JIL as used while changing the information pertinent to your environment.




  • 12.  RE: look back condition not satisfied even if it is Success

    Posted Apr 25, 2023 02:51 PM

    Sagar,  

    I think it would be really good to review the information in regards to Box Logic;  when to use a box vs when not to.  Also, seems this is inside of a box and your condition on Job_B is with the run_window  the lookback of an hour is never really going to work most of the time due to you having it running 45 minutes after job A has ran --  your window is really only open for 15 minutes from the logic in the JIL that I am looking at.   If you look at some of the older versions of AutoSys and look up information on Box Logic I think it will be of great help.  

    ---thanks    ca




  • 13.  RE: look back condition not satisfied even if it is Success

    Posted Apr 25, 2023 03:18 PM

    Is there any reason to have a box here? I would remove the box. I think you might be able to remove the schedule from job b too, adding another condition that it is to run when job a is done. 




  • 14.  RE: look back condition not satisfied even if it is Success

    Posted Apr 23, 2023 08:08 PM
    I am trying to use success(job_a, 01.00) condition, which I believe according to docs check if job_a is successsfull within the last hour or not right?  But in autosys workload automation. It is always showing condtion not satisfied. May I know why? Does it depends on any other things. I tested it by manually changing the status of job_a to Success. But in successor job the condition never satisfied.
    Sagar Kunwar,  Apr 21, 2023 10:44 AM

    Is your successor job, say job_b, Activated?  If job_b is sitting in a Box and that Box not Running, then job_b would be ignored by AutoSys, regardless of any new status of job_a.

    Let's say job_b is floating and not in any Box.  In that case job_b is Activated by default, unless it's already in one of the Running statuses.  To test, set job_b's status to Inactive (it's really Activated).  Then set job_a's status to Success (it could already be Success, but this will be a new Success).  You should find job_b's status has changed to Running or a completion status (Success, Failure, etc.).

    Note that in the case of floating jobs, lookback doesn't really change anything.  You could set it to 01.00, 0, or not include a lookback parameter; it will act the same.  If job_b is in a Box, then the lookback timing comes into play depending on when job_a went Success and when the Box containing job_b is Run sometime afterwards.




  • 15.  RE: look back condition not satisfied even if it is Success

    Posted Apr 24, 2023 08:54 AM

    Sagar - Please post your entire job definition. You are correct in your understanding of the lookback condition, but there must be some other factor at play here.