Can we do conditioning in crown expression?
This means I have scheduled to run the bot on the 5th day of the month. if it falls on the weekend can I run a working day before which will be Friday on the 4th of the month? if not possible how to deal with this scenario.
I read up a little on Uipath Documentation for cron jobs, but I dont think what you asked is currently “entirely” possible. Let me explain.
The closest expression I could write to meet your condition with the v2020.4 is: 0 0 0-6 5W# * ? Between 12:00 AM and 06:59 AM, on the weekday nearest to day 5 of the every month.
The above expression suits your requirement if the 5th of month is a Saturday, then the job will run on the 4th, which will be a Friday.
The challenge however is if the 5th of a month is a Sunday, your process will only run on Monday the 6th. Because the W parameter looks for the nearest weekday, which will of course be the (the next day), Monday. The W parameter was something new to me and have not used it myself before in Linux.
I tried the above expression in orchestrator cloud community edition, seems to work!
Extras!
I tried to find out if the v2020.10 has some updates on Cron jobs, I dont see it in the beta-previews.
This exact particular problem is solved in linux forums, but I am not entirely sure how UiPath/ Quartz.NET have implemented the cron expression.
Please update to uipath team to implement in the new version or at least in triggers we have option not to run non-working days. if we have the option to run based on the calendar we upload it will be easy. This is quite a requirement for most of the scenarios in the supply chain, insurance, and finance.
yes this is additional logic should be in code which I am aware. we have around 20 bots runs for 10 mins on each day of the month each bot has sep requirement to run on particular data. so it it has condition in schedule it would save lot of efforts