Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,538
Community Members
 
Community Events
184
Community Groups

Jira cron expression - monday to friday

Edited

Hello community,

I was trying a automation during a cron expression 

like:

every 5 minutes, during 17 - 7 from monday to friday 

  0 */5 17-7 * * MON-FRI *

But it looks like the day of week is wrong, I received this error:

"You must use '?' for either the day-of-month or day-of-week."

And it is still the same error, when I try:

  0 */5 17-7 * * 1-5 *

Does anyone have an idea where the error is?

I was using this documentation:

https://support.atlassian.com/jira-software-cloud/docs/construct-cron-expressions-for-a-filter-subscription/

And day-of-week describes:

1-7 or MON-FRI

 

 

 

 

2 answers

1 accepted

0 votes
Answer accepted
Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 20, 2023 • edited

Day of month according to that doc page is fourth position, so

 0 */5 17-7 * * 1-5 *

would be

 0 */5 17-7 ? * 1-5

 

Removing last asterisk for the year as it's optional.

 

Edit: Not sure if 17-7 will work, might need to do 17-23,0-7 but no idea if the atlassian scheduler works with it or not, https://crontab.guru/ doesn't seem to like it at least.

Hi Radek Dostál 

I can save this expression, it looks like it works. 

Is it the same "17-7" from 5pm to 8am?

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 20, 2023

Hi DG,

Try this:

0 0/5 17,7 * * MON-FRI

Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Mar 20, 2023

17,7 means "17" and "7", which is different than a time range 17-7.

0/5 should be functionally the same as */5 I believe, it's the same as writing 0-59/5 so it practically is the same without a difference, unless I misunderstood cron.

@John Funk 

When I try this:

0 0/5 17,7 * * MON-FRI 

I received the same error:

"You must use '?' for either the day-of-month or day-of-week."

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events