Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ScriptRunner Escalation Service doesn't accept CRON Expression

Zita Bagi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 3, 2020

Adaptavist ScriptRunner Escalation Service doesn't accept CRON Expression:

 */10 08-17 * * 1-5

And I get the error message "Please enter a valid integer or Cron expression"

Upon checking the expression at https://crontab.guru/#*/10_08-17_*_*_1-5  no error is found.

As far as I understand, this type of CRON wouldn't cause malfunction?:

https://scriptrunner.adaptavist.com/5.0.2/jira/escalation-service.html

Any ideas why this isn't accepted?

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Sven Schatter _Lively Apps_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 3, 2020

This might be because your cron expression only consists of 5 parts. Cron expressions for Atlassian products need to consist of 6-7 parts. This information is from the Confluence docs but internally Jira probably uses the same mechanism, so it is likely that the same rules apply.

If you enter the cron expression into Confluence you get a live evaluation that tells you what's wrong:

tooshort.jpg

As you can see, it tells us that the expression is too short.

If we add one more part (a * at the end) you get another error:

unsupported.jpg

So it looks like you might have to choose a simpler cron expression (and make sure it has 6-7 parts).

Hope this helps!

Best regards,
Sven

Zita Bagi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 3, 2020

Thanks! Where in confluence is it possible to enter this to have it checked?

I have already managed to enter simpler CRON expressions, but this time I'd like to enter this one.

Sven Schatter _Lively Apps_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 3, 2020

I got to this screen via "General Configuration > Scheduled Jobs" and then clicking "edit" on one of the Jobs. :)

temp.jpg

Like Zita Bagi likes this
Zita Bagi
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 3, 2020

I see. Then I have actually managed to find out what was wrong. This works:

*/10 08-17 * * 1-5 ?

Since ? " indicates 'ignore this time interval' in the cron expression", I put ? in the end and now this runs every 5 mins.

Thank you for the clues!

TAGS
AUG Leaders

Atlassian Community Events