How to make a cron expression for every other tuesday

Maurice Stassen January 26, 2021

I want to make a automation rule with cron expression so it will be sceduled every other tuesday. How can i do that? What is the cron expression?
And what tuesday will it start then?
I now only see the optien of #2 wich is every second (tues)day in the month...

3 answers

1 accepted

0 votes
Answer accepted
Maurice Stassen January 26, 2021

That helps, thank you.

But still one question remaining:
Is it possible to make a cron for every tuesday in even-weeknrs (weeknr 2, 4, 6, ...) ?

Paloma Fondon Araujo
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.
January 26, 2021

Hi @Maurice Stassen 

In the cron expression you must put that it is done every Tuesday, 0 0 12? * TUE *, (according to this cron expression, it would be at 12.00pm)

And then, you could include in the automation rule an advanced compare condition, this rule checks if the number of week is even:

Compare condition even week.PNG

{{# =}} {{now.weekOfYear}} / 2 - ROUND ({{now.weekOfYear}} / 2,0) {{/}}

I hope it helps you

Greetings

Like Maurice Stassen likes this
Kara Sheil July 18, 2022

Combining the cron string and the advanced compare condition string doesn't seem to work when trying to set up a subscription to a filter. You can only add in the cron expression, I'm not finding the magic in the code string to add the advanced compare condition into the cron expression field. 

1 vote
Paloma Fondon Araujo
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.
January 26, 2021

Hi @Maurice Stassen 

Maybe you can include 2 cron expressions, one for the first Tuesday of each month (0 0 12? 1/1 TUE # 1 *) and one for the third (0 0 12? 1/1 TUE # 3 *) of each month (in this case would be held at 12.00 pm).
With this application you can make the calculations and the corresponding parameters to indicate on what date it would start:

http://www.cronmaker.com/

I hope it helps you.

Greetings

Kara Sheil July 18, 2022

This solution doesn't work when there are five Monday's in a month (Aug 2022) and you want a subscription to a filter to be sent every other week. Is there another option?

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.
January 26, 2021

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events