ESP Workload Automation

 View Only
  • 1.  Run a Job Every 45 Days Except on Weekends or Holidays

    Posted Mar 17, 2020 07:25 AM

    All,

    I apologize for having originally posted this in the wrong place. 

    I have a requirement to run a job every 45 days except for weekends or holidays.  If I use the example of a two week job (i.e. RUN EVERY TWO WEEKS BEGINNING MARCH 20, 2020 PLUS 0 WORKDAYS) it works just fine.  However, when I substitute run every 45 days for run every two weeks like this:

     

    RUN EVERY 45 DAYS STARTING MAR 20TH 2020 PLUS 0 WORKDAYS

     

    . . the result is that the literal number of days is used, and holidays and /or weekends are ignored.  Is there a way to do this so that holidays and weekends are taken in to account?  I have tried using GENTIME and I cannot seem to get that to work either.

     

    Thanks in advance!



  • 2.  RE: Run a Job Every 45 Days Except on Weekends or Holidays
    Best Answer

    Broadcom Employee
    Posted Mar 17, 2020 08:48 AM
    Hi Jonathan, 
    I think the easiest way to make this work is in two parts.  The job will build every 45 days and wait to run until the next business day. 

    This is at the event level. 
    SCHEDULE EVERY 45 DAYS STARTING MARCH 20

    Below is the job definition. The DELAYSUB plus 0 WORKDAYS will make it wait until the next workday. 
    JOB ABC
          RUN DAILY
          DELAYSUB 08.00 PLUS 0 WORKDAYS
    ENDJOB

    NOTE:
    I think I could also do it in an application without the SCHEDULE statement at the event level.  It would use a similar two step approach but it would take 8-10 lines of CLANG.

    Don



  • 3.  RE: Run a Job Every 45 Days Except on Weekends or Holidays

    Posted Mar 17, 2020 10:12 AM

    Don,

     

    I completely didn't think to 'delaysub' into the next workday!  Thank you very much for this.  It works perfectly.

     

     

    Jonathan Calloway

    IT Operations Support Analyst

    Infrastructure and Operations

    BlueCross BlueShield of Tennessee

    423-535-7342 (office) | 423-309-2547 (mobile)

     



    Please see the following link for the BlueCross BlueShield of Tennessee E-mail disclaimer:  https://www.bcbst.com/about/our-company/corporate-governance/privacy-security/email-policy.page