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.
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?
Hi @mdurham,
your solution is very helpful, but I have one problem. I donât know why, but I can just add days only from today. Iâm looking for solution for calculating working days, and this looked useful, but I need add free days minimum one year ago if itâs not possible I have to create excel file with free days. Thank you.
@Palaniyappan is right, we can store those days in config or other sheet. when bot runs it should compare current day and not-working day using If condition in Init State of RE framework.
Iâve not tested this out, but the query to get a calendar by name should be something like this instead
[...]/odata/Calendars?$filter=Name eq 'CalendarName'
If you know the Calendar ID, you could use:
[...]/odata/Calendars(CalendarID)
Both are GET requests