Cron Expression for Last 2 Sundays of Every month at 6 AM

Description

Hi ,
Can some one help me the cron expression to schedule as below
Bot to trigger on Last 2 Sundays of every month at 6 AM

Link

Date

2025-07-11

Related UiPath products

Orchestrator

@avinashy

cron can work with last sunday of month but not last second or so

you might need to create logic yourself to identify the last second sunday ..

or rather add a queue item with differ date for first run and then at end of the run calculate the date of next run and add queue item with differ date

cheers

Hi @avinashy

I don’t think, direct cron expressions for such scenario is possible.

Last Sunday of the month doable but not last 2 sundays.

Instead you can try workaround like this

1)schedule process to run on every Sunday
2)and then from within your code,
use powershell script to filter out if today’s Sunday is one of the last 2 sundays.

3)If yes, carry out the run, else stop the run right away.

Hope this helps.

Readers
Sonali

Hi @avinashy you can add calendar for this process where you can enable run only for two Sunday
Go to tenant and there settings and then add non working days

Add calander select the dates you want process to be trigger
Now while adjusting process trigger you can select this calander

Also you can schedule it for the time no need for crone expression by this way
Hope this helps

1 Like

Hi @avinashy

You can schedule the bot to run every Sunday at 6 AM using the cron expression 0 0 6 ? * SUN * Inside the workflow, add logic to check if the current day is one of the last two Sundays of the month and exit if it isn’t.

As another option, create a custom calendar in Orchestrator and manually select the last two Sundays each month.

Happy Automation

1 Like