Why is my CRON expression not accepted?

I am trying to set up a rule that will create an issue every weekday at noon UTC. The below CRON expression is what I am trying to use:

0 0 12 ? * 2-6 *

However, when I try to publish the rule I get the below error:

Value -1 for dayOfMonth must be in the range [1,31]

The value I have set for dayOfMonth is '?' so that I can set the dayOfWeek to include only weekdays. How do I get my desired result?

1 answer

1 accepted

0 vote
Andreas Knecht Community Champion Jan 27, 2017

Hi Jamie,

Sorry about this, but seems like you've run into a bug with the validation our cron library performs: https://codebarrel.atlassian.net/browse/AUT-130

For now can you try changing your CRON expression to: 

0 0 12 ? * 2,3,4,5,6 *

Hope that helps!

Cheers,
  Andreas 

Hi Andreas,

The CRON expression you provided was accepted - thank you!

 

Regards,

Jamie

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

56 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you