Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

CRON Expression for 2 Start Times

Jesse Ortega Jr
Contributor
January 26, 2022

Hello All. I am trying to create a crons expression to run twice a day every day but I am having no luck. I am using 0 16, 0 22 ? * MON-FRI to get the out put of 4PM and 10PM Monday - Friday but instead it runs at 10PM and again in 16 minutes Monday - Friday. Is there a way to set 2 start times in the cons expression?

1 answer

1 accepted

7 votes
Answer accepted
Édpo César
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 26, 2022

Hi @Jesse Ortega Jr ,

Let me start off by saying that CRON is always a challenger. 😂

But a saw a little error in your example. Please, could you try this? 0 0 16,22 ? * MON-FRI

 

If I helped you, please mark my answer as correct to help other members.

Jesse Ortega Jr
Contributor
January 26, 2022

Thanks a lot! This worked :) 

What if the time include minutes; 8:30 AM and 3:45 PM every Mon-Fri?

Édpo César
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 26, 2022

Hi, @Jesse Ortega Jr

Glad to hear that. ✌🏽

About your example, try this: 0 30,45 8,15 ? * MON-FRI

Like # people like this
Jesse Ortega Jr
Contributor
January 27, 2022

Awesome! I seeing the logic now. Thanks a lot for your help, very much appreciated!

Like Édpo César likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events