AutoSys Workload Automation

 View Only
  • 1.  How to stop only certain start_times?

    Posted Oct 06, 2016 02:01 PM

    Given the following box:
    /* ----------------- CNFB001B ----------------- */

     

    insert_job: CNFB001B   job_type: BOX
    owner: cnfjob
    permission: gx
    date_conditions: 1
    days_of_week: mo,tu,we,th,fr
    exclude_calendar: HOLS_EDJ
    start_times: "20:30,21:30,22:30"
    description: "Generate AFP file for confirms using a vendor tool (Crawford)"
    max_run_alarm: 45
    alarm_if_fail: 1
    group: nlpacnfrm-1

     

     

    On October 14th, I want this job to only run at 20:30.  I plan on taking down the event_demon (aka scheduler) at 9pm.  This 20:30 iteration could run past 21:00.  I need for the 20:30 iteration to run and not the remaining two start_times.  I will start the scheduler the following morning around 4am.

     

     

    How do I prevent the last two start_times from running at all?  I'd want things to go back to "normal: on Monday.

     

    We are on AutoSys 11.3.6, sp1...



  • 2.  Re: How to stop only certain start_times?

    Broadcom Employee
    Posted Oct 11, 2016 12:43 AM

    Hi,

     

    Putting a job ON ICE prevents the job being triggered without affecting the workflow.

    Here are two ways you can stop this job from being triggered after the 20:30 run.

     

    1) After the 20:30 job run completes(before 21:30), issue a sendevent command to put the job ON ICE,  and later take the job OFF ICE after 22:30 hrs. This would skip both the 21:30 and 22:30 runs of the job. The following runs would be scheduled as usual.

     

    Example: Putting the job ON-ICE and taking it OFF-ICE

     

    This command puts the job ON ICE:
    sendevent -J CNFB001B -E JOB_ON_ICE

     

    This command takes the job OFF ICE:
    sendevent -J CNFB001B -E JOB_OFF_ICE

     

    Note: The above changes would be immediate.

     

    2) If you know, by what time the 20:30 run would complete, you can set the job to avoid running during that specific interval.

     

    Example: Prevent a Job from running during a specific interval
    This example prevents the job CNFB001B from running between the hours of 21:15 and 22:40. For instance, if you know that the 20:30 run would complete by 21:00, you can set it to be put on ice by 21:15.

     

    This command puts the job ON ICE at 21:15:
    sendevent -J CNFB001B -E JOB_ON_ICE -T "DD/MM/YYYY 21:15"

     

    This command takes the job OFF ICE at 22:40 p.m.:
    sendevent -J CNFB001B -E JOB_OFF_ICE -T "DD/MM/YYYY 22:40"

     

    Note: Kindly ensure the date format and time is in sync with your scheduler timings.

    We recommend you to test this behaviour on a test job in your system to ensure the time and date format compatibility.

     

    Additional Information:

    Reference Guide 

     

    Hope this helps!

     

    Regards,

    Avinash



  • 3.  Re: How to stop only certain start_times?

    Posted Oct 11, 2016 02:47 AM

    Hi Penny

     

    And what about a simple solution to just update the start time of the job on October 14th and put back the original start_times before the next runs on Monday

     

    update_job: CNFB001B

    start_times: "20:30"

     

    Regards

    Jean Paul

     



  • 4.  Re: How to stop only certain start_times?

    Posted Oct 11, 2016 03:07 AM

    Hi Penny

     

    In addition to my last update:

     

    You said:  This 20:30 iteration could run past 21:00

     

    In your scenario, if you can schedule a single run at  22:30  ( skipping the runs of 20:30 and 21:30) , you can also use a job override on October 14th like that:

     

    override_job: CNFB001B

    start_times: "22:30"

     

    This is going to skip job runs of 20:30 and 21:30.

    The Job will run at 22:30 and the next start time of this job will be resumed ( recalculated) to normal without any intervention

     

    It might help to run a single occurrence of this Job on October 14th ( But at 22:30 )

     

    Regards

    Jean Paul

     



  • 5.  Re: How to stop only certain start_times?

    Posted Oct 11, 2016 08:28 AM

    Adding "run_window" could be another approach. I see you have set the max_run_alarm to 45 minutes. Presuming the job takes 45 minutes on average, the following run_window would keep the job from starting the following day until 20:30.

     

    run_window: "20:30-23:30"

     

    The following day, when you bring up the Scheduler at 04:00am, you'd see something like this happen:

     

    CAUAJM_I_40245 EVENT: CHK_RUN_WINDOW   JOB: CNFB001B

    CAUAJM_I_40163 Job <CNFB001B > is outside the run window. Sending the CHK_RUN_WINDOW event to reschedule the job on its next available start time.

    CAUAJM_I_40245 EVENT: CHK_RUN_WINDOW   JOB: CNFB001B

    CAUAJM_I_40245 EVENT: CHANGE_STATUS    STATUS: INACTIVE        JOB: CNFB001B

    <Not run today - Missed the Run Window>

     

    If you look up the `autorep -J CNFB001B -d` output, you'd see a STARTJOB for 20:30 10/15/2016.

     

    Cheers,

    Chandru



  • 6.  Re: How to stop only certain start_times?

    Posted Oct 17, 2016 01:43 PM

    I see this more like an override situation.