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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

CRON Expression for every 2 weeks

Hello, 

 

I want to use the CRON expression for every 2 weeks for one of my Filters to send out to users.

Haven't been able to find it online. Is it possible? I saw a link below that might be able to do it but seems to only apply if you're using Automation for Jira which I'm not using.

 

https://community.atlassian.com/t5/Jira-Questions/How-can-I-schedule-a-rule-to-run-every-2-weeks-on-a-particular/qaq-p/655520

 

Thanks 

1 answer

1 vote
Daniel Eads Atlassian Team Jul 14, 2020

Hi Harry,

The normal subscriptions for filters are powered by cron expressions in the backend. The GUI can simplify things a bit, but the issue is that cron doesn't support "every two weeks" or "every 14 days" as expressions. You could add two separate simple subscriptions for the first and 15th of the month perhaps:

image.png

or a single subscription using the cron expression:

0 0 1,15 * *

This might lead to some trouble though if you're trying to line up with sprints that might run every 2 weeks exactly, since the days will drift a bit from month to month.

The solution you found for Automation is great because it sidesteps the limitation with cron. And the good news is that Automation is now built-in to Jira in Cloud, so you do have access to run the rule outlined in that thread without any additional apps or cost. I'm happy to help answer questions about the Automation configuration if you'd like.

Cheers,
Daniel

Hi @Daniel Eads 

 

Thanks for your reply and suggestion. I don't think that would work for me. I should have been a bit more specific. I would like to send out every 2 weeks on a Tuesday.

 

If you have any other suggestions please let me know I'm happy to see if I can work around it. If not then I'll have to send it every week.

 

Thank you

Like Nathaniel Victor likes this

I second this... we want to do the same. Every 2 weeks is different than the 1st and 3rd Tuesday of a Month...

Daniel Eads Atlassian Team Feb 12, 2021

Hi @Nathaniel Victor - just want to note that this is a technical limitation of cron and won't be remedied in Jira filter subscriptions. The standard unix fix for this is to run a script every 7 days, but use logic inside the script to "skip" every-other run (see this discussion on Linux Questions for more info). As you can't run scripts inside Jira filter subscriptions and only have the cron expression available, the every-other workaround doesn't apply.

You can replicate the subscription functionality with a Jira Automation rule:

  • When: Scheduled
  • Then: Lookup issues
  • And: Send email

The scheduled trigger in automation has cron expressions, but also supports a fixed-rate schedule of every __ minutes/hours/days. The Send daily notifications with a list of all open issues in current sprint rule in the template library is a great starting point - switch the trigger to the days you need, change the lookup action to match your JQL search, and swap the Slack message action for sending an email.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
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