I’m trying to set up a process in Orchestrator that runs monthly, but only starting from the 6th of each month, when a file is expected to be available.
Here’s what I need the process to do:
It should not run before the 6th of the month.
When it runs, it should check for the presence of a specific file.
If the file is not available, the job should throw an error and be marked as failed.
Once the process successfully runs, it should not run again until the next month.
If the file isn’t available on the 6th, it should keep checking daily until it is.
Has anyone implemented something similar?
Any advice, best practices, or examples would be greatly appreciated!
Schedule the bot to run on 6th by default..if it is successful then good..if not include code to create one more schedule to run on 7..or use a queue approach and create a queue item with 1 day deferred date so that it runs the next day and this continues till the file is found
if queue model is followed then on first trigger add a new queue item so that the process starts to check
Thanks for the input. Just to clarify your suggestion on programmatically creating a new schedule:
As far as I’m aware, Orchestrator don’t allow creating or modifying schedules dynamically via the process itself. Could you elaborate on how you envision this being implemented?
Yeah, UiPath Orchestrator can’t create or modify schedules dynamically from within running processes. It’s usually done manually via the Orchestrator UI or via external API calls with the right permissions.
Set up fixed schedules in Orchestrator (e.g., a daily or CRON trigger) and handle all dynamic execution logic in your workflow - using assets, queues, or flags to control when the process runs or exits.
Dynamic schedule creation would require an external script or automation using Orchestrator’s API (if supported), which involves admin-level permissions and additional complexity. But for most cases, controlling the logic inside the workflow combined with fixed triggers is the best and most maintainable practice.
Time trigger for the 6th, and then a queue trigger so that the process can create a queue item if the file doesn’t exist (with a postponement on the queue item for when you want it to run next) is a great solution. Just make sure the process is set up to get the queue item and mark it complete.
I would suggest you to split your process into 2 parts
Part 1: Dispatcher - This will add one item into your queue. Queue details should contain the expected file path only. This should be scheduled for every 6th day of the month using Cron expression
example:0 8 6-31 * *
Part 2: Performer - Processing the item. This - You can schedule for every day. If item is not available - BOT will check for item and completes the run without processing. On 6th day - BOT will check and identify that a queue item is available to process. Based on the file path mentioned in the queue item, BOT will check for that file. if the file is not available - send exception email as part of the process only and postpone the queue item for next day. This will continue till the file is available.