Cron expression for quater

Urszula Forenc
Contributor
September 21, 2018

Hi, 

how can I write a cron expression for:

Every first day of a quater ?

The purpose is to create an Automation rule, where issues older than 3 years must be deleted, sheduled every first day of a quater (1 Jan, 1 Apr, 1 Jul, 1 Oct). It also need to send email, that this deletion will ocurre (one week before the deletion).

Thank you!

2 answers

1 accepted

0 votes
Answer accepted
tomd
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2018

Hello Urszula, 

A crontab entry for the first day of every quarter:

0 0 1 */3 *

source: https://crontab.guru/every-quarter

Tom 

Urszula Forenc
Contributor
September 27, 2018

Hi, it doesn't work...

Capture.JPG

BR

Urszula

Urszula Forenc
Contributor
September 27, 2018

Ok, it needs "?" on the end of the crone expression - that means, that the day of week (Mon, Tue...) doesn't matter.

Like Nacho Moreno Ortega likes this
3 votes
Rosa M Fossi
Contributor
April 30, 2019

@Urszula Forenc  Hi Urszula!  Did that expression work? 

I'm also using Automation for JIRA... but the expression above seems to be missing a leading "0" (since per JIRA documentation, the seconds part of the string is required). 

I'm building a quarterly automation, and this is what I've come up with....

0 0 0 15 */3 ?

which in theory should next run July 15th 2019.  

Let me know if the extra zero wasn't necessary! Thanks   :) 
 

Urszula Forenc
Contributor
May 1, 2019

Hi Rosa,

I use it: 0 0 1 */3 * ?

I've found very usefull website: cronmaker.com - you can test there your crones.

BR

Urszula

Like # people like this

Suggest an answer

Log in or Sign up to answer