Some scheduled workflows not triggering

Hi,

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):

Example of non-working triggers

I have 3 workflow not triggering

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

Hi @Valerian_Lebert, welcome to the community and I’m so sorry for the trouble.

I’ve tested this on my end but didn’t run into any trouble here. Is there any chance your docker container wasn’t running when the execution was due?

Hi @MutedJam

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…

But I don’t know what to fix…



Stangly today this trigger

ran at this time

What am I missing :slight_smile:

@Valerian_Lebert

I’m doing the same as you with triggers and have the same docker setup, my TZ variable to the n8n docker container is Europe/London

Have you tried using a ‘Custom’ cron syntax schedule just to test if it’s something strange with the ‘Trigger interval’ syntax style schedule ?

For me this is still executing at 09:30:00 daily, just double click on the icon below to see my syntax

1 Like

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)?

Hi

Here is my environment

docker run  --rm -d --name n8n -p 5678:5678 -e GENERIC_TIMEZONE="Europe/Paris" -v ~/.n8n:/home/node/.n8n n8nio/n8n 

Later I’ll try to schedule some triggers on different time during the day to investigate

2 Likes

Hey @Valerian_Lebert,

I would recommend the TZ option as well…

docker run --rm -d --name n8n -p 5678:5678 -e GENERIC_TIMEZONE="Europe/Paris" -e TZ="Europe/Paris" -v ~/.n8n:/home/node/.n8n n8nio/n8n 
1 Like

Hi,

I did a few more tests :

Adding the TZ environment variable didn’t change anything.

I created 3 test workflows with just a trigger:

I am using my computer since 9AM with a pause and here is my execution log:

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.

Hey @Valerian_Lebert,

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

Strange behavior again

I will try with custom cron expression

Hi

So I did

  • switch to npm local instance (instead of docker)
  • changed my triggers to cron syntax.

Still no execution in my log. Any ideas ? I am running on Mac M1 if this helps

Screen taken on 15 march 12h33

Hey @Valerian_Lebert,

I had forgotten about this one, Just checked my logs and it appears to be running as expected.

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?

Hi,

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.

Hey @Valerian_Lebert,

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.

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