ESP dSeries Workload Automation

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

    Posted Mar 16, 2020 02:22 PM

    All,

     

    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!

     

    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


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

    Broadcom Employee
    Posted Mar 16, 2020 04:33 PM
    Hi, 
    You can use any of the javascripts in the example, and check for workdays except holidays;

    WOB.sched=false;
    if (today('workdays except holidays'))
    {
    num=daysFrom('March 20,2020');
    if (num%45==0) WOB.sched='today';
    }

    ----------

    WOB.sched=false;
    if (today('workdays except holidays'))
    {
    genTime('thisday','today');
    num=daysBetween('March 20, 2020',thisdayDATE,'days');
    if (num%45==0) WOB.sched='today';
    }


    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/intelligent-automation/ca-workload-automation-de/12-2/scheduling/examples-cookbook/scheduling-a-job-to-run-every-two-weeks.html

    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/intelligent-automation/ca-workload-automation-de/12-2/scheduling/examples-cookbook/scheduling-a-job-to-run-every-two-weeks-and-advancing-it-for-holidays.html