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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

jira - run cron every 2 days

Hi I'm trying to run a cron every 2 days at 9am.

I thought this would work

0 0 9/2 * * ?

 

But I'm getting those triggered at 1pm and 3pM.  I think ever 2 hrs after that.  

what am I doing wrong.

thanks

1 answer

0 votes
Jack Community Leader Jul 06, 2021

Should it be….? Haven’t tested…

0 9 */2 * *

minute hour dom month dow 

note the time is GMT so if you want local time add offset.

0 9 */2 * * says Unexpected end of expression

0 9 */2 * * ? this worked.. question does this mean the same thing?

Jack Community Leader Jul 06, 2021

Does it mean the same thing as what? As what you were looking for? I believe so but only you can say for sure via your testing. 

thanks.

is there any way to check the cron instead of edit and wait?

Jack Community Leader Jul 06, 2021

You could test out the format on minutes…

*/5 * * * *

hmm ok I have this as my cron job

0 9 */2 * * ?  - verified it from https://crontab.guru/#0_9_*/2_*_*  as supposes to be running every 2 days. However, https://support.atlassian.com/jira-software-cloud/docs/construct-cron-expressions-for-a-filter-subscription/ seems different. the 9 is a minute time and the /2 hrs.

But looks like it's running every 2 hrs.

audit log shows it running at 

6:09

8:09

10:09

so apparently atlassian is using their own version of cron.

 

so 0 9 */2 * * ? should be 0 0 9 */2 ? *  is my thinking right?

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you