For a few weeks now I am playing with n8n, deployed locally with docker.
I noticed some issues with the scheduler: some of my scheduled workflow don’t trigger though they work correctly if I trigger manually.
I suspected that time of execution was too long, but even some quick scenario don’t trigger.
For a test, I created a workflow with just a “schedule trigger”. This workflow triggers every hour as expected (except during sleep time but it is normal):
I tried to deactivate and reactivate, saving again etc. but nothing works…
I remember adding an environment variable in my docker start command to set timezone to mine, but scheduled trigger seems properly configured regarding my timzone. I also checked timezone in workflow setting.
Any idea?
Information on your n8n setup
n8n version: 0.217.2
Database you’re using (default: SQLite): SQLite
Running n8n with the execution process [own(default), main]:
Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker
Thanks for your answer. I don’t think it is a docker issue as I have a test workflow with only a “shedule trigger” that do execute as expected, every hour (except during computer sleep time)
I am not sure but I think it is a timezone issue. I noticed today a workflow run during night though it wa supposed to run at 11am…
I normally find it is the TZ option that causes the mixups I ran into in the past. @Valerian_Lebert can you share the env options you have set (removing anything sensitive)?
I am positive my macbook was not in sleep at 11am. And 11pm trigger triggeres at 1:06pm.
So I am wondering: when we set Days Between Triggers to 1 and Trigger at Hour to 11am, is it possible that if a timeslot is missed (because of sleep time), all next executions are shifted ?
Or is it just an alias for cron syntax and time of the day should remain?
I am really out of idea. I am thinking switching to npm instance instead of docker.
Are you running n8n in docker on your mac then? I don’t think the schedule is moved but if you have the debug logs from the container we can take a look.
I have just set up the same test, 3 workflows with just the schedule node in there set for 5pm, 11pm and 5am. I will report back tomorrow with the results
Running on Mac shouldn’t matter for the Docker side of things although I am wondering if maybe there is something else local causing an issue that I am not seeing. Have you tried setting up n8n on a cloud provider that has a free tier to see if you have the same issue?
After switching to npm local instance, I forgot to set environment timezone variable, and my workflows were created on wrong TZ.
After setting the TZ properly, my “cron” triggers triggered as expected. I’ll check over the next days if everything works as expected.
So for any reason, running in docker on my machine was not working as expected and running without virtualization seems OK.
In summary, here is my feeling:
schedule triggers seems more reliable using cron syntax rather than with default config box. With default config box, I have the feeling that a missed trigger can shift next executions. Is it possible, or am I wrong ?
I have an issue on macos/docker where are triggers unreliable. I don’t konw if it is my environment or a general docker/macos issue.
I would need to check what happens if a schedule is missed to answer the first part. On the second part though I ran my test on Mac M1 with Docker and did another test on a linux box with Docker and didn’t have the issue on either of them. I suspect that the TZ and Generic Timezone option was not picked up properly.