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?
Hi @mbuk 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:
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.
@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
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:
I’m hosting n8n on AWS.
Would you have any logs you could share on this one? That might be what helps with the debugging You might need to set your
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