AutoSys Workload Automation

  • 1.  BOX Behaviour

    Posted Sep 08, 2015 01:55 PM

    Hi,

    we have the following scenario in our envt, where BOX is scheduled to run from Mo to Fr at 7AM, and it has 1 job which is scheduled to run from tu to sat at 6AM. SO on Monday (7th Sept), box comes to active at 7AM. Since job inside that box is scheduled to run at 6AM on tuesday, so, box keeps in running state till that job runs successfully on tuesday at 6AM. and BOX completed successfully on Tuesday at 6AM. till now, i am fine with this. but i am not getting the next iteration (Tuesday's behaviour).

    so in the above scenario, on Tuesday (8th Sept) since box comes in to active state at 7am, and job inside box is scheduled to start at 6am tuesday, so why the job didnt run for Tuesday at 6am? why it is waiting for Wednesday 6AM.

     

    As per my understanding, as soon as BOX comes to active state, job inside those box will start running if any of the job met its starting condition, so on tuesday, both box and job met its condition and should start running. But this is happening only for BOX job not the job inside that box.


    Below is the details along with snapshot.

     

    insert_job: BOX    job_type: box

    date_conditions: y

    days_of_week: mo,tu,we,th,fr

    start_times: "07:00"

     

     

    insert_job: NEXTDAY    job_type: cmd

    box_name: BOX

    date_conditions: y

    days_of_week: tu,we,th,fr,sa

    start_times: "06:00"

    send_notification: n

    command: dir

     

    Previous run - 7th Sept

    Job Name Last Start           Last End             ST Run/Ntry Pri/Xit

    ________________________________________________________________ ____________________ ____________________ __ ________ _______

    BOX 09/07/2015 07:00:00  09/08/2015 06:00:01  SU 22251/1 0     

     

    Status/[Event] Time Ntry ES ProcessTime           Machine

      --------------  --------------------- -- --  --------------------- ----------------------------------------

    RUNNING         09/07/2015 07:00:00    1  PD  09/07/2015 07:00:00  

      SUCCESS 09/08/2015 06:00:01    1  PD  09/08/2015 06:00:02  

      [STARTJOB] 09/08/2015 07:00:00    0  PD  09/08/2015 07:00:00  

        <Event was scheduled based on job definition.>

     

    NEXTDAY 09/08/2015 06:00:00  09/08/2015 06:00:00  SU 22251/1  0     

     

       Status/[Event] Time Ntry ES ProcessTime           Machine

       --------------  --------------------- --  --  --------------------- ----------------------------------------

    STARTING        09/08/2015 06:00:00    1  PD  09/08/2015 06:00:00 SAPPRD

    RUNNING         09/08/2015 06:00:00    1  PD  09/08/2015 06:00:01 SAPPRD

         <Executing at WA_AGENT>

    SUCCESS         09/08/2015 06:00:00    1  PD  09/08/2015 06:00:01 SAPPRD

       [STARTJOB]      09/09/2015 06:00:00    0 UP

         <Event was scheduled based on job definition.>

     

    New Run - 8th Sept

    Job Name Last Start           Last End             ST Run/Ntry Pri/Xit

    ________________________________________________________________ ____________________ ____________________ __ ________ _______

    BOX 09/08/2015 07:00:00 ----- RU 24748/1        

     

      Status/[Event]  Time Ntry ES ProcessTime           Machine

      --------------  --------------------- -- --  --------------------- ----------------------------------------

    RUNNING         09/08/2015 07:00:00    1  PD  09/08/2015 07:00:01  

     

    NEXTDAY ----- 09/08/2015 06:00:00  AC 24748/0        

     

       Status/[Event] Time Ntry ES ProcessTime           Machine

       --------------  --------------------- --  --  --------------------- ----------------------------------------

       [STARTJOB] 09/09/2015 06:00:00    0 UP

         <Event was scheduled based on job definition.>



  • 2.  Re: BOX Behaviour

    Posted Sep 08, 2015 02:39 PM

    I discussed this in another thread. DO NOT have timed jobs in a box if they do not share the same run days or calendars etc. also if they  do not impede the next tun of the box.

     

    times job rule: a timed job doesn't know its next run until after completion and when its firs inserted.

     

    first rule of a box:

    all jobs by default must complete so the box make complete.

     

    I believe you will have value in getting someone on the team to mentor and audit your autosys environment.

     

    Hope this helps and good luck .



  • 3.  Re: BOX Behaviour

    Posted Sep 08, 2015 10:13 PM

    Hi Sunish,

     

     

    As regards your question;

     

    so in the above scenario, on Tuesday (8th Sept) since box comes in to active state at 7am, and job inside box is scheduled to start at 6am tuesday, so why the job didnt run for Tuesday at 6am? why it is waiting for Wednesday 6AM.

     

    please review this Wiki document:

    https://wiki.ca.com/display/AE1136SP2p/HowaBox+Runs

     

    Default Box Job Behavior

     

    The following default rules apply to boxes:

     

       

    •   Jobs in a box run only once for each box execution.

       

    •   Jobs in a box start only if the box itself has a status of RUNNING.

       

    •   Boxes are used primarily for jobs with the same starting conditions.

       

    •   A box used to group sequential jobs can contain up to 1,000 jobs.

       

    •   A box remains in RUNNING state until all the jobs it contains have run.

       

    •   A box returns a status of SUCCESS when all the jobs it contains have run and returned a status of SUCCESS.

       

    •   A box returns a status of FAILURE when all the jobs it contains have run and one or more of the jobs has returned a status of FAILURE.

       

    •   A box runs until it reaches a status of SUCCESS or FAILURE.

       

    •   Using the sendevent command to change the state of a box to INACTIVE changes the state of all the jobs it contains to INACTIVE.

    job inside the box, tried to start at 6AM on Tuesday and as the box itself was NOT running, the job didn’t run then. However, the job must have run at 7AM as soon as the box came to be RUNNING.

     

     

    Thanks & Regards,

    Chandru



  • 4.  Re: BOX Behaviour

    Posted Sep 09, 2015 07:24 AM

    The jobs are out of sync. simple as that. As i explained already.

    common issue in scenarios such as this one.

    I taught this in classes for over a decade.

     

     

    Steve C.



  • 5.  Re: BOX Behaviour

    Posted Sep 09, 2015 08:14 AM

    If you really want to kick of a job 23 hrs after the box has been selected, which gives you only one hour to complete the box and the job.

    Why place a job that "late" in the box? Is it not easier and safer to place the job inside a different box signaled from the first box through either filetriggers or held-resources?

    Does it not matter if the job is prevented from running every now and then, due to the extremely tight schedule created?