Get Non-Working Days from Orchestrator

Does anyone know a way for an RPA process to find out if a particular day is scheduled as a non-working day in Orchestrator?

Hi
welcome back to uipath community
i hope that can be mananged only within the process workflow with a IF condition in the beginning of the process
if true then to continue with the process by placing the sequence inside the THEN Part or goes to ELSE part…

and its not possible with SCHEDULE option in orchestrator or even in CRON expression (being not that versatile to handle)
may be i might have missed any option…if so kindly correct me

Cheers @mdurham

Sorry, I don’t understand what you mean.

If I have a variable ‘workingDate’ and assign it a value Now.AddDays(-1) to give it yesterday’s date then how do I find out if yesterday was a working day or a non-working day on orchestrator?
Today would be a working day which is why the process has run but I’m trying to find if there is an activity or code I can use in my workflow to tell me if yesterday (or any other day) is a non-working day.

Hi@mdurham
I face the same problem,Have you got the solution?

I found a solution using the ‘Orchestrator HTTP Request’ activity.
Leave ‘JSONPayload’ blank and ‘Method’ as ‘GET’.
Set ‘RelativeEndpoint’ to “/odata/Settings/UiPath.Server.Configuration.OData.GetCalendar()”
Set ‘JSONResponse’ to your own choice of variable string.

If you write line (for development) the variable string with the output to the screen it should contain the list of ‘ExcludedDates’ which are the non-working days on orchestrator.
You then need to check if the date you are looking at is in the list or not and build it in to your program.

1 Like

Hi @mdurham
It’s a magic way!
It’s worked!
But if It’s have more than one calendar,How can I get the special calendar?
I have tried like this /odata/Settings/UiPath.Server.Configuration.OData.GetCalendar(calendarname)
/odata/Settings/UiPath.Server.Configuration.OData.GetCalendar(“calendarname”)
but it can’t response the correct json.
Best Regards!

donghai, do you have succeeded to get non work days from more than one calendar?

@vzipperer
No, the requirement was changed,so I didn’t need to do that.