Control Room & Scheduler

Expand all | Collapse all

Advice on Scheduling processes that run on certain days

  • 1.  Advice on Scheduling processes that run on certain days

    Posted 06-19-2019 22:03
    We have several processes that only run on specific days. For example:

    • Process A runs on the 15 unless the 15th falls on a holiday or weekend then it will run the business day prior to the 15th. This is the same for the end of the month as well
    • Process B runs on the 15th + 1 day, unless that day is a holiday or weekend. If the 15th is a Friday then process B will run on Monday.

    so far the best solution is to keep scheduling manually each month, does anyone have advice for this?

    David Clark
    Technical Architect

  • 2.  RE: Advice on Scheduling processes that run on certain days

    Posted 06-20-2019 01:21
    Edited by David Morris 06-20-2019 01:25
    You're looking for ideas, so I'm going to give you a suggestion that will make you cringe.

    You could drop your existing processes into parent processes or add some logic to the beginning of your Process A and Process B. Math isn't my thing but here's an example. I think the earliest date that Process A may need to run is the 12th. That's assuming the 15th is Sunday, 14th is Saturday, and 13th is Friday and is a holiday. So, you could schedule this Process A (with some new logic at the beginning or in its parent process) to run on the 12th, 13th, 14th, and 15th. When it runs on the 12th, it does some checking on dates. For example, it will see if the 15th of the current month is a holiday or weekend. If is, then it checks the 14th, 13th, and finally checks 'today' or the 12th. FYI there are some actions you can use in the Calendars internal business object that may make this checking simpler. Anywhoo, the point is effectively to verify whether Today() is the first business day before the 16th. If it is, then it runs the process like it's supposed to. If it's not, then it will simply complete.

    Process A will run again on the 13th, and then the 14th, etc. Now, for the schedule settings. I'm thinking you'd have it not run on holidays and weekends, just as you said it should not. So, unless I'm having a brain fart, once it actually runs through its logic and does the process, it will not run on any days after that because those days are recorded as holidays or weekends in BP, assuming you've configured the calendar. For those days afterward that are not holidays or weekends, the process will start up but should immediately see that the 13th or whatever was or wasn't a business day and will make the appropriate decision on whether or not to run today. I feel like I could have used fewer words to describe this. Oh well, let's keep going. =)

    Process B is the same thing except backwards. It would run on something like the 16th, 17th, 18th, 19th. More? I'd have to think about it. It does similar date checks that Process A does but in reverse. Let's say we get to the 18th, the process would still run if this is a weekday. But it should check to see if the 16th or 17th were business days. And again, if they were then the process simply completes for today.

    Have I missed anything? Beautiful visuals to spark the interest and push the audience into action? =)

    Dave Morris
    3Ci @ Southern Company
    Atlanta, GA