Cron Expression Syntax error

Hi all,

I’m trying to trigger an automation to run only in work days, from day 4 through 31, at 12:05 PM.

I’ve been trying to use the expression 0 5 12 4-31 * 2-6 *, but it’s returning syntax error (1600).

How can I solve it?

Try this one 0 5 12 ? * MON,TUE,WED,THU,FRI *

@guilherme_melato Try this one
0 5 12 4-31 * 1-5

It worked, but the problem is that I need it to not run in the first 3 days of the month (1, 2 and 3)

Hi @raja.arslankhan,

It didn’t worked…

Same Error.

Try this one:

0 5 12 4-31 * MON-FRI

It keeps returning the same error.

Thanks anyway!

@guilherme_melato wait I open my orchestrator :grinning:

1 Like

@guilherme_melato I figured out actuall problem.
we can restrict only one thing either date or weeks.
When we are selecting date from 4-31 then saturday and sunday also coming and later we are selecting Monday - Friday also which is not correct

Oh, I see…

I set the cron expression to not run in the first three days of the month, and, in the workflow, I’m gonna declare a variable with the current date, and then a condicional with an expression that validates if the current date is saturday or sunday, and if so, use the activity ‘terminate workflow’. I tested, and worked!

Thanks for the help!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.