CRON expression for 3 days before of Month's last week Friday

Hi Team,

I am looking for a Corn expression which will help me to schedule the bot on 3 days before of Month’s last week Friday.

I have written an expression which is fetching the last week Friday but not sure how to set it 3 days before. Can you any please help me…My expression of last week friday is below scheduled at 6 PM. But I need to schedule 3 days before…Please help

0 0 18 ? * 6L

Hello @NiladriGen and welcome the UiPath Community Forums :partying_face:

Try one of these Cron expressions:

0 0 18 ? * 3L *
Description: At 18:00:00pm, the last Tuesday of the month, every month.

0 0 18 L-3 * ? *
Description: At 18:00:00pm, 3 days before the end of the month, every month

You can generate Cron expressions using this site:

Check out the options under the Days tab.

Cheers

Steve

Thanks Steven.

0 0 18 ? * 3L * - this is not I am looking for.

I am looking it will check the last friday of that month and and then 3 days before I want to schedule.

For example month of Jan’ 23 last Friday is 27th and 3 days before that is 24th Jan, that I am looking for.

This will be applicable for the every month. with the following cron expression I am getting the last Friday of the month but not getting how to get 3 days before.

0 0 18 ? * 6L

Again thanks for your reply. If you help me out here, then it will be great.

Regards,
Niladri

@NiladriGen ,

This is tough. The expression I generated doesn’t satisfy all the scenarios. If you don’t find a solution, as a workaround, you can generating the next run date-time and schedule the robot’s next run using Orchestrator APIs.

Hello

I am a bit confused.

3 days before the last Friday of the month. Does that not mean the last Tuesday of the month (the 24th Jan)?

What date would February, March and April be?

Cheers

Steve

Yes Steven for Jan it will be 24th

For Feb - 21st
For Mar- 28th
For April - 25th

I am looking for one cron expression for this

How about this: 0 0 0 ? * 3#4 *
Except FEB it works. I do not think you can get anything better using CRON.

image

I need a CRON expression for 3 days before of Month’s last week Friday

CRON expression for 3 days before of Month’s last week Friday

Hi Steven ,
i want a cron expression which runs on the wednesday preceding the last saturday of every month

No, because the last Tuesday of the month can be after the last Friday, e.g.:

 M  T  W  T  F  S  S
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

Supposed day is the 23rd, but your suggestion would give 30th.

I have a similar problem. My town collects the recyclable trash on the last friday of every month. So I have to prepare and put it outside on the evening before the last friday of the month. I cannot set up a reminder for it in any software I know of, because this kind of logic is not available. Setting a reminder for the last Thursday works most the time, but 1 out of 7 it is 1 week too late, whenever Thursdya is the last day of the month.
When someone needs schedule for 3 days before last given day of the week, such schedule would be off 3/7th of the time.