You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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:
And day-of-week describes:
1-7 or MON-FRI
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi DG,
Try this:
0 0/5 17,7 * * MON-FRI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.