Cron Schedule

Hi All

I’m just trying to get a CRON schedule setup but it’s having some unexpected results.
I currently have:
*/22 7-23 * * *

What I am trying to do is get the schedule to run at 22m past the hour every day between 0700-2300 but it’s currently running at unexpected times - I can see it currently executing between 1am and 4am.

I assume I just have the format wrong here. Can anyone advise?
Thanks

Hi @mbuk :wave: So your cron expression is mostly correct, but you’re running it every 22 minutes, not 22 minutes past an hour. You’re probably more looking for 22 7-23 * * *

I’m not too sure why it would be running outside of the hours you’ve specified though, unless perhaps you don’t have the proper timezone set? How are you running n8n? If you’re self-hosting, could you share your Docker compose file?

This template would be helpful:

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
1 Like

Hi

Thanks for the info. Iv’e updated to 22 7-23 * * *
Yes, odd that it is running outside of 7-23. It was as you state running every 22m, but seems to be stopping at 5am.

We host this on AWS which is configured to UTC - so expect it to only be an hour different to BST.

1 Like

@mbuk No worries - I’m not sure if that new Cron expression would fix this up, but if it hasn’t, could you share some logs with us and that Docker compose file? That would help us try to further diagnose this for you :+1:

So for some reason, even though we have a schedule set to run at 6am it actually runs 5 hours later at 11am. This seems a bit odd as when I use a time now function - the application has the correct concept of time:
image

I’m hosting n8n on AWS.

Regards

Would you have any logs you could share on this one? That might be what helps with the debugging :bowing_man: You might need to set your N8N_LOG_LEVEL to DEBUG and let this cron schedule try to run again outside of the time parameters you’re expecting, depending on what logging options you currently have set :+1:

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