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,323,832
Community Members
 
Community Events
168
Community Groups

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 Brickey 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 Brickey 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 Brickey 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?

Hi, I just ran into this post. I think what you are looking for is 0 9 * * 1-7/2 which runs on every second day of the week :)

Suggest an answer

Log in or Sign up to answer