Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I run an automation once per year?

Sonja Altmann
Contributor
January 4, 2024

Hey all.
I'm new to automations.  I want to run an automation on a specific date 15 March every year (regardless of the day of the week) .

I think I will need to use a cron expression but it comes up with an (Unexpected end of expression)  What have I missed?

30 8 15 3 *

In my head it should return 8:30am on the 15 March in any year.

Thanks for your help :)

2 answers

1 accepted

2 votes
Answer accepted
Tim Kopperud
Community Champion
January 5, 2024

Hi @Sonja Altmann, you might try this:

0 30 8 15 3 ?

It should be accepted by Automation "cron checker". 

In this article cron in Jira is explained, and it contains this table

image.png

Seconds (in front) needs to be specified. In the document I linked to there are some examples, like this one

image.png

Which is close to your requirements. Trying this example throws a more descriptive error though, as you see here

image.png

Using instead this "0 0 1 1,15 * ?" gives no error for that example. 

TimK.

Tim Kopperud
Community Champion
January 8, 2024

Hi @Sonja Altmann, thanks for accepting my answer. I'm glad it was helpfull. 

TimK.

0 votes
Trudy Claspill
Community Champion
January 5, 2024

Hello @Sonja Altmann 

You can find a variety of cron generating web pages to help you construct the expression. Here is one such page:

https://www.freeformatter.com/cron-expression-generator-quartz.html

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events