Scheduling a bot to run on the last working day of a month

Hi,

Can’t find this anywhere, apologies if asked before. Is there a way - and if not could one be made in Orch please - to run a job on the last working day of a month? Can’t quite get it with cron expressions, and we have a few which need to be run on this schedule.

Any thoughts?

Thanks,

Alex

0 0 0 L * ? *

try this and enable non working days in orch?

2 Likes

Or actually try this in Orchestrator. Last working day of the month.

0 0 0 LW * ? *

2 Likes

This would mean the bot wouldn’t run on that day though? Instead we’d like it to run the day before but Orchestrator currently isn’t that “smart”?

Thank you though, I should have clarified your two answers in my questions as things which are close, but not quite what we’re after, we’ve checked. Isn’t LW also last weekday, not working day? Technically different in the case of public holidays and what’s causing us this headache!

1 Like

Hmm yes i see. Going to be a difficult one with cron expressions.

If it is only one day a month it would not take long to just schedule it in advance manually. A bit of a pain i know.

1 Like

Something I thought of, but not sure is possible, would be having a process run on Jan 1st and update the schedule for the unattended processes which require to be run on the final working day of each month? This year no holidays fall on the last day of the month (that I’m aware of) so it’s fine just using LW, but each year it would be good to automate the checking of this. If I could perhaps have a process check any dates where LW is a holiday and it could schedule an extra run the day before (assuming LW coincides with a “non working day” and orchestrator skips the run), but can you “start” a job and basically put it on hold? So for example tell the process to run on a specific bot much later on in the year?

I was also considering updating an asset, but then the bot would still need to run every day to check if “today” was one of the ones mentioned in the asset so would defeat the object of having a schedule…

1 Like

Create a job that runs daily to check if today is the last working day of the month. If its true, then start the job.

Hi,
Thank you for your suggestion. I added it to our internal ideas tracker for our team to consider.

2 Likes

Sorry, didn’t see this - thing is, we don’t really want it to run daily, that’s the point. Not looking for a workaround, just a solution, if that makes sense?

Thanks though, we’ve currently gone with the daily check-run anyway, waiting for UiPath/cron expressions to catch up :smiley:

That’s fair enough. I don’t think cron will ever be able to work with last working day of a month, as it has no idea of any working day. UiPath may come up with something to be able to validate working days with its internal calendar. The “check” action will need to be performed regardless on the server or the agent. either way the “check” action only require minimum resource. Sometimes the work around is the solution.

Or when a job runs it could finish up by checking what the next run date should be and scheduling it?

Hi Alex, what was the solution to this?

how i can schedule a process to be executed only on last working day of a month

Sorry for slow reply. In the end we went for the workaround until UiPath update, so we have a daily job which checks a file to see if it’s the last working day of the month. Inelegant and clutzy, but it works.