Anybody have a Rovo Chat prompt for creating a valid CRON statement to run an automation. I told it to "Create a Cron statement to run this Jira Automation that runs every other hour starting at 6am stopping at 6pm Monday - Friday and it returned a statement that fails validation.
I went back to the CRON builder website I have always used in the past, but I would like to be able to recommend the rovo chat to our users as they create their own scheduled automations.
@Dan W
For your requirement of "every other hour starting at 6am stopping at 6pm Monday-Friday," the correct cron expression is: 0 0 6-18/2 ? * MON-FRI
The most common validation error in Jira Cloud automation cron expressions is the "You must use '?' for either the day-of-month or day-of-week" error. This occurs because
Thanks
Jayesh R
Hi @Dan W
Glad that solution works.
You can also use this website for crone creation. I am creating crones from here, and it wis orking in Jira.
https://www.freeformatter.com/cron-expression-generator-quartz.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I went back and looked at my prompt again and U did not specify it was a Jira automation just an automation. I rewrote it "create a cron expression to run a Jira automation every 2 hours between 6am and 6pm monday - friday" and it returned a valid answer.
0 6,8,10,12,14,16,18 ? * MON-FRI
Jayesh provided a better answer
0 6-18/2 ? * MON-FRI
As Jayesh said above the main errors in the original returned answer were:
Thanks for everybody taking a look at.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dan W
You’re right—Jira Automation (Quartz-style cron) wants literal day names (MON–FRI) or the Quartz numbers where 2–6 = MON–FRI. Using 1–5 means SUN–THU, which fails (is wrong).
Check please this doc: https://confluence.atlassian.com/jirasoftwareserver/constructing-cron-expressions-939938814.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The part wrong with the returned results was the automation wants Mon-Fri and the prompt returned 1-5 which is wrong anyway it should have been 2-6
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.