Is it possible to put more than one Cron-Expression in one Automation Rule?
Hi @Troth_ Stefanie
Not technically but you should be able to club more occurrences into one cron. What challenge do you face?
Hi @Troth_ StefanieWelcome to the Atlassian Community!
You can achieve this with one automation rule, but not by adding two separate CRON expressions to the same Scheduled trigger.
As you need the work item created at 08:00 on the second Monday and the last Monday of every month, I would configure the rule to run every Monday at 08:00, and then add an If/else condition to continue only when today is the second Monday of the month, or the last Monday of the month.
Date smart values are available specifically for this{{now.ofTheMonth(2, 1).jiraDate}}
This returns the second Monday of the current month {{now.lastOfTheMonth(1).jiraDate}}
returns the last Monday.
You can therefore compare {{now.jiraDate}} against those values and create the work item when either condition matches.More smart values you can find herehttps://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-timeRegardsGor
Hi, JIRA was just migrated into the cloud version. And now we have to create all the old "scheduled issues" new. One Scheduled Issues had 2 Cron-Expressions: ""0 0 8 ? * 2#2" und "0 0 8 ? * 2L". The Tickets should be generated at the 2nd and the last Monday of a month. Is there any chance to create 1 Automation Rule with these two conditions?
Ja not very straight forward for a simple cron
@Gor Greyan gave the approach to handle this.
Basically set the cron for every monday -> 0 0 9 ? * MON
and add a compare condition like below:
first value => {{#and(now.dayOfWeek.equals("Monday"), or(now.dayOfMonth.isBetween(8, 14), now.plusDays(7).month.value.isAfter(now.month.value)))}}true{{/}}
condition => equals
second value => true
in the section below
Thank you for your answer. That was very helpful! Just one more question. Can I check the "upcoming executions" somewhere, as in the old version? I would like to check, that I did everything correctly.
@Troth_ StefanieFor the Crone Expression, it doesn't provide Upcoming Execution, but for the Basic one, it is available.If you need Crone, for Every Monday at 09:00, you can use this.0 0 9 ? * MON *
I just want to check, if the Issues will be created correctly. And I can't use the basis trigger, because there are more than one occurences (due dates = 2. Monday and last Monday per month and creation of the issue one day after the due date of the previous one). I already edited the automation rule, know I want to check, if the results are correct.
It looks like you're new here. Sign in or register to get started.