Difference between Octopus Cron Expressions and Standard Cron Expressions

I have a trigger that I need to have run every 12 hours. At 1am and 1 PM.

I have researched this online and found that this expression should do it:

0 1,13 * * *

This is explained as:

0    1,13   *   *    *      
-     -     -   -    -
|     |     |   |    |
|     |     |   |    +----- all days of the week (Monday through Sunday)
|     |     |   +------- all months
|     |     +--------- all days of the month
|     +----------- hour 1 and 13 (1 am and 1 pm) of the day
+------------- min 0 of the hour

Plugging this into an online cron expression checker shows me that it checks out:

But when I put that in, Octopus tells me:

What are the extra fields that octopus wants?

Hi @OctopusSchaff,

Thanks for reaching out to Octopus Deploy.

Our embedded Chron library uses seconds - this means you will need to add an additional zero to your expression. More details can be found here:

For your particular example, you would use the following: 0 0 1,13 * * *

Here’s what it would look like in Octopus:

If you have any more questions about this or anything else please let me know.

Regards,

Garrett

That worked perfectly! Thank you!

(And I now see that the docs said that, but for some reason I did not understand that is what it was trying to say.)

1 Like

Hi @OctopusSchaff,

Thank you for the quick reply. I’m glad that you were able to get it working.

If there is anything else I can assist with, please let me know.

Regards,

Garrett

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.