Orchestrator More Advance Schedule

orchestrator

#1

Team -

please help me with this. we need to schedule orchestrator on ‘N’ th business working day. if the mentioned ‘N’ th day is holiday as per business then it should consider the next day as ‘N’ th business day and run on next day.

For example: if we schedule on 14 th business day of August and if that day in holiday list even between MON - FRI, it should run on the next day consider as 14 th business day.

Require your great help on this!


#2

Hi @sjaagde6,

It helps you.

Regards
Balamurugan.S


#3

Thanks for your quick response. But i do not find solution for what i was requesting for, which is like to run bot only on business days of month, excluding business holidays (which would change yearly).


#4

Hi.

To be honest, you should just schedule on each weekday, and have logic built in like if a file is not available for example which would happen on a holiday so it doesn’t process. Or you can even control when it runs by a spreadsheet of holidays.

CRON doesn’t have a feature for holidays. So only way really is to have the logic built in.
Like, for me I schedule them daily and they don’t really process on holidays because there is nothing to process and therefore ends successfully.


#5

Thanks ClaytonM. I would be happy if I could receive the steps to schedule - as control to check spreadsheet of holidays and skip.


#6

It’s not something I’m currently using, however, if you wanted to do it, you would have all the business holidays in either a database or spreadsheet. (I would create a shared workflow that can be reused for this)

You would pass it the current date (Now), and it would return True or False if it is a holiday by looking at the data. For example, if it’s in Excel, you would Read Range and maybe just use some LINQ on the column, like:
isHoliday <as Boolean> = dtHolidays.AsEnumerable.Where(Function(d) CDate(d("Date").ToString.Trim).ToString("MM/dd/yyyy") = Now.ToString("MM/dd/yyyy") ).Count > 0

For database, you would probably use like Execute Query or something.

Once you know if it’s a holiday, then simply use a Decision or If condition using that Boolean to skip the process and log the reasoning.

Additionally, you would need to schedule it daily probably. Ideally, you would want some kind of trigger like a file being available or set of data that tells it to process or not. Then, you technically don’t need to check if it is a holiday. However, if your preferred method is to check if it’s a holiday and to run the next day, I think you would need to build in a variable that contains the day to process (like the Nth day of the month or every so many weeks), then that will be the day you send over to check if it is a holiday —if that day is a holiday, then it will check the same day the following day and know that it was a holiday, so to process that day instead. That part might be a little more tricky.

I probably just confused you on the last part.

EDIT: Corrected expression above to check if date is in the holiday spreadsheet, because I was missing the column name or index. (ie d(“Date”) )

Regards.


#7

wow… so nice of you…! thanks a ton for providing timely and good response. Yes I will also try with the way you mentioned detailed manner. please also share any workflow if you create any for this, which I can reuse. Thank you ClaytonM


#8

Hi ClaytonM - if possible could you please share the sample workflow. this would be great help to me.


#9

could you please share sample workflow for business day calculation through orchestrator. please


#10

Hello @sjaagde6
I don’t currently have a sample with me that calculates a business day. That is because we normally run the job even on holidays, and if there is nothing to process, it just won’t do anything.

There is a new feature coming to Orchestrator (is it 2018.3? I’m not sure), where you can be more flexible in your schedules, like set holidays. I only seen it briefly, so I’m not completely sure how to use the feature yet.


#11

Thank you so much for that info. I would probably will explore with the new feature and keep you posted.