Advanced Cron Expression Examples

Jira hosting: Cloud, Server, Data Center

As a creator of Schedule Issue, while creation, on the 3rd step, you can choose “Advanced” mode for setting cron expression of trigger type.

Cloud

Server

Cloud

Server

 

This option allows you to provide your own Quartz Cron Expression. It can be useful when you need to set specific exceptions in your planning Schedule Issue, e.g weekends need to be off for regular created task.


Examples of using cron expressions.

All following examples are showed on Cloud version of Jira.

Example 1 - an expression to create a trigger that simply fires every hour

“0 0 * * * ?”

 

Example 2 - an expression to create a trigger that fires at 2:25 on every Monday to Friday.

“0 25 2 ? * MON,TUE,WED,THU,FRI *”

 

Example 3 - an expression to create a trigger that fires at 10:30, 11:30, 12:30, and 13:30, on every Wednesday and Friday.

“0 30 10-13 ? * WED,FRI”

 

Example 4 - an expression to create a task once a month, on the last Thursday of the month at 14:00.

“0 0 14 ? * 5L *”

 

Example 5 - an expression to create a task around 6th day of the month on a business day Monday-Friday, sometimes it will be Friday (5) and sometimes even Monday (7).

“0 34 12 6W * ? *”

 

The Scheduler doesn’t support triggers executed more frequently then an hour.


Examples from Atlassian Community

Problem

Cron Expression

Source if available

Problem

Cron Expression

Source if available

“every month on day 5th, 15th and 20th”

0 0 0 5,15,20 * ? *

https://community.atlassian.com/t5/Jira-Software-questions/corn-expression/qaq-p/1490086#M99690

“starts every 3 month on the 15th of March, June, September and December”

0 0 12 15 3/3 ? *

https://community.atlassian.com/t5/Jira-questions/Jira-automation-module-Problem-with-CRON-expression/qaq-p/587076

“How can ı schedule my yearly issue?”

 0 0 0 1 1 ? *

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Jira-Workflow-Toolbox/qaq-p/1530118

“I want to run once per week, every Sunday at Midnight”

0 0 0 ? * SUN *

https://community.atlassian.com/t5/Jira-Software-questions/weekly-cron-job-for-automation-for-jira/qaq-p/1229353

“every three months on day 21st”

0 0 8 21 3,6,9,12 ?

https://community.atlassian.com/t5/Jira-Core-questions/cron-expression/qaq-p/425524

“every first day of a quater (1 Jan, 1 Apr, 1 Jul, 1 Oct)”

0 0 0 15 */3 ?

https://community.atlassian.com/t5/Jira-Software-questions/Cron-expression-for-quater/qaq-p/897223

“I would like to set certain specific deadlines for the same JIRA project as for example:

10/02 of every year

10/05 of every year

10/08 of every year

10/11 of every year”

0 0 10 10 2,5,8,11 ?

https://community.atlassian.com/t5/Jira-Service-Management/Automation-project/qaq-p/1447661

“should have a reminder every first wednesday of every month”

0 15 7 ? * 4#1

https://community.atlassian.com/t5/Jira-Core-questions/setting-a-task-every-first-wednesday-of-the-month/qaq-p/1266205

“I have hit a wall trying to find a cron expression that will work to set up either a task that will run on:

  • first Wednesday of every third month, or

  • first day of every third month, or

  • first day of a specific month annually”

 

 

 

0 0 12 ? 3/3 WED#1 *

0 0 1 1 */3 ?

 

0 0 12 1 2 ? *

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Creating-quarterly-issues-using-The-Scheduler-help-needed/qaq-p/1279863

“schedule a task for every year on April first”

0 0 12 1 4 ? *

https://community.atlassian.com/t5/Jira-questions/How-to-create-a-cron-job-for-every-April-1st/qaq-p/581688

“I am trying to make a service run at 9am every day”

0 0 9 1/1 * ? *

https://community.atlassian.com/t5/Jira-questions/Script-runner-escalation-service/qaq-p/190798

 


If you not sure that set cron expression is correct and supported, you can check which icon is appeared next to Cron Expression field:

Additional if you hover the mouse over exclamation mark icon, you will see what is the problem with set cron expression.

If you don’t know how should looks your cron expression, following sites can help you to set it:

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

http://www.cronmaker.com

Feel free to tell us what topic should be covered: thescheduler@psc-software.atlassian.net