Date Based Trigger - Run triggered a day early if public holiday

Hi all,

I had a question regarding time based triggers. I have a bot I am building that will run a payment proposal within 1SAP but I am unsure how to proceed with the required schedule i need it to run on.

The proposal is needing to be run each Thursday morning, however if there are public holidays during that week then the run date changes per below -

  1. If there is a public holiday on Friday, then the bot needs to run on Wednesday morning
  2. If there is a public holiday on Thursday and Friday, then the bot needs to run on Tuesday
  3. If there is a public holiday on Thursday, then bot needs to run on Wednesday

Basically, the bot needs to run the payment proposal a day early in each circumstance. I’ve considered if uploading an excel calendar to orchestrator is the best option, but would a calendar like this be able to look ahead and assess if there’s one of the above 3 scenarios occurring for that week and change the date it runs based on this?

any help is much appreciated.


Hi @Seantt

I think you can build the logic within ur workflow itself

In the bot, once the process is finished by bot, next bot can set schedule for the Uipath process via studio using orchestrator api, I think there is a orchestrator api for scheduling itself, so once process is finished by bot , before ending the bot, let the bot schedule for next week run based on public holiday in nextweek using orchestrator api

Try that approach

Thanks and Regards
Nived N

1 Like

Thanks @NIVED_NAMBIAR , i hadn’t considered building the logic from within the bot itself.

I’ll give this a go and come back if i have any issues. Thanks :slight_smile:

Sure you are welcome

You can use this as reference

Mark the answer as solution if got resolved

Let me had any questions

Thanks and Regards

Nived N


I’m having a little bit of trouble applying the API in my bot. I understand how i would use the API to call orchestrator and set the schedule, but how will my bot know looking ahead at the next week which days are holidays?

A second part to this is, as I’ve written in my initial post, the bot needs to be run Thursday morning in a normal week and the next date set to be run the following thursday unless one of the three scenarios above occur. However if the time between those two Thursdays crosses over into a new month, then the bot must run again on day 1 of that new month (e.g. lets say the bot runs Thursday and the following Monday is the last day of the month, i would then need the bot to run on Tuesday, day 1 of the new month). I’m unsure how to build this logic into my bot so that i can then manipulate the schedule request API to change the orchestrator schedule.

Any help really appreciated :slight_smile: