Issue with cron expression: day of week and day of month getting ORed

This topic was automatically generated from Slack. You can find the original thread here.

Tim Kracht : I have a Cron task that keeps firing at times it is not supposed to. At 01:00 PM, between day 1 and 31 of the month, Thursday through Saturday, January through December but it just went off today at 1PM

Dylan Sather (Pipedream) : Would you mind clicking the Share button in the top-right of the workflow and share it with dylan@pipedream.com?

Tim Kracht : Okay just shared it

Tim Kracht : I disabled it for now, just to make sure it didnt trigger again.

Dylan Sather (Pipedream) : can you modify the cron schedule to read:

0 13 ** ** 4-6

Believe it or not, the issue you’re seeing is actually by design, even though it’s not intuitive. The day of the month and the day of the week portions are ORed when evaluated by cron, meaning that the day of the month portion you had (1-31) actually overrides the day of the week portion. Setting the * in that section works, though, which should accomplish what you intended

Tim Kracht : Thanks Dylan much appreciated