ESP Workload Automation

 View Only
  • 1.  Loading jobs on different day due to Holiday

    Posted May 12, 2020 09:58 AM
    Hello, I was wondering if anyone had any ideas on a different way to handle job schedule days for holidays. My example is with July 4th falling on a Saturday and the business not wanting a cycle on that day but  still needing the Saturday jobs to run for this week. We normally handle this by backing the schedule up. For instance we look at any job that would normally run on Friday and move it to the Thursday schedule and do the same for Saturday. Any Saturday job would be moved to the Friday schedule this way we could skip Saturday for the holiday but everything for the week would have run. 

    Right now we create a copy of the cycle and edit the jobs as above. Friday jobs to Thursday and Saturday jobs to Friday. We then run the two applications we created in place of the normal cycle for that day. This makes for quite a bit of editing of the application.since any job that only runs on Friday or Saturday will need to be edited. I understand that there are change all commands but it is still time consuming. 

    Just wondering if anyone had thoughts on a different way to accomplish this?

    ------------------------------
    [Designation]
    Grange Insurance
    [City]
    ------------------------------


  • 2.  RE: Loading jobs on different day due to Holiday

    Broadcom Employee
    Posted May 12, 2020 10:37 AM
    Hi Keith, 
    There may be other ways to handle this.  

    I will start with the simple using the July 4th example.

    Add two special days to the calendar.   SPEC_LESS_2DAY   and   SPEC_LESS_1DAY  
    In the appl,  jobs that needed to RUN or NORUN would have statements like these
    IF TODAY('SPEC_LESS_2DAY') THEN RUN TODAY
    or
    IF TODAY('SPEC_LESS_2DAY') OR IF TODAY('SPEC_LESS_1DAY') THEN RUN TODAY  
    or 
    IF TODAY('SPEC_LESS_1DAY') THEN NORUN TODAY 

    Additional NOTE - It would be possible to automatically determine if 2 days from now is a holiday and set a variable.  Then use a similar "IF" logic to determine whether a job should run today or not.  This would remove the need to add the calendar entries.  Depending on whether it is EVERY holiday,  or only holidays that fall on specific days of the week,  the logic would get more complex.  Let me know if we need to work this out

    Let me know if I "missed the boat"

    Don 





  • 3.  RE: Loading jobs on different day due to Holiday

    Posted May 12, 2020 12:33 PM

    Thanks Don,

     

    I believe that will work for us. This is something we only have to do when the holidays fall on a Friday or Saturday so this will be perfect to code and leave in place then we can just define special days in the calendar when we want to run this. Best part is once we have  all the jobs coded we won't have to do it again, just define the special days and off we go.

     






  • 4.  RE: Loading jobs on different day due to Holiday

    Broadcom Employee
    Posted May 12, 2020 02:53 PM
    Hi Keith,

    Found following from ESP example Cookbook:
    Scheduling a weekly job and adjusting it for holidays
    Objective
    Schedule a job to run every Monday, unless Monday is a holiday. If Monday is a holiday, then run the job on the previous workday.
    Solution
    Use the following RUN statement for the job:
    RUN MONDAY LESS 0 WORKDAYS
    Explanation
    The job always runs on Mondays that are workdays. When Monday is a holiday, and thus a non-workday, the job runs on the previous workday.
    -------------

    Hope this may give you some ideas too.

    Lucy


  • 5.  RE: Loading jobs on different day due to Holiday

    Posted May 13, 2020 07:31 AM

    Lucy,

     

    Thank you for your response. We do use this approach on several jobs where we know the holiday is on a set day each year such as Memorial day is always on a Monday and Thanksgiving is always on a Thursday and this won't change. For this instance though the hang up is the rotating holidays like the 4th of July and Christmas are on different days of the week each year. Saturday and Sunday being a bit sticky as our Calendar was set up originally to not recognize Saturday or Sunday as a holiday, so this year with July 4th on a Saturday the scheduler will still try to load the normal schedule even though I defined it as a holiday. To get around this I make a mass change to all the jobs set to run and add a NORUN JUL0420. Just seems like I am making more work for myself than it needs to be.

     

    Thanks, Keith

     






  • 6.  RE: Loading jobs on different day due to Holiday

    Broadcom Employee
    Posted May 13, 2020 04:46 PM
    Hi Keith,

    Could you provide the output of "LISTCAL calendar"? I want to see why it will recognize Saturday as holiday.

    I wonder if you may group the jobs to different SUBAPPLs. Then you can use IF logic with SELECT/DESELECT subappl_name. It would be much easier than change RUN criteria for every job. Or you can put JOBs with different run schedules to different library member, and use IF logic with INVOKE on APPL level, so that only the proper jobs will be loaded into the APPL.

    And the way mentioned by Don is also a good way to address it.

    There are other ways too, like  using TEMPLATE and variable. Then you will only need to make limited changes.

    I am sure other people have ideas to do this as well.

    Lucy


  • 7.  RE: Loading jobs on different day due to Holiday

    Posted May 26, 2020 07:44 AM

    Hi Lucy,

     

    Sorry for the late response but I missed this email in my inbox and it got shuffled down. I may have not been clear in my post. Saturday is not recognized as a holiday in our calendar. Even when I defined it as a holiday  and ran simulations on what would load that day the normal Saturday schedule loaded.

     

    Thanks,

     

    Keith

     

     






  • 8.  RE: Loading jobs on different day due to Holiday

    Broadcom Employee
    Posted May 29, 2020 11:25 AM
    Hi Keith,

    I did a simple test here, it shows that ESP can recognize if SAT is defined as a holiday.
    APPL TES5
    JOB SET LINK PROCESS
    run SAT
    norun holiday
    endjob

    I defined MAY 30 as a HOLIDAY:
    LUCY1 00.00 SAT 30 MAY 2020

    When I simulate the above ESP Proc for May 30th, SET is not selected. To compare, May 23 is not defined as a holiday, and SET is selected when I simulate for May 23.

    If you hope ESP works like this too, you can open a support case and we will check how to adjust it.

    Otherwise the method suggested by Don seems the best one for you.

    Hope this helps,

    Lucy