Scheduled Trigger executing twice

Describe the problem/error/question

We are noticing a workflow that is triggered via a daily schedule is being executed twice. We have replicated the issue using a simple test workflow and have observed the following:

  1. When the workflow is initially created, the schedule executes correctly with no duplications. In the case of our test workflow, it is set to execute every two minutes.

  2. When the workflow is edited (and thus a new version of the workflow is created) we see that the scheduled trigger is now executed twice. Looking at the details of the duplicate executions, we can see that one execution is from the original workflow version, and the 2nd execution is from the updated version of the workflow.

    It therefore seems that the ‘old’ scheduled trigger from the old workflow version is still being executed in addition to the scheduled trigger from the new version of the workflow. Other than copying the workflow to a new workflow (and deleting the original workflow), is there any way to fix this?

In the screenshots below you can see that this workflow executed every 2 mins without duplicates…until it was edited around 11:37am

Information on your n8n setup

  • n8n version: 1.123.6
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Kubernetes
  • Operating system: Amazon Linux 2023

Hi @David_Andrews

Have you tried Unpublish (deactive) the workflow after making the changes, and then Publish it again afterward?

When you edit the workflow and it starts executing twice, does this happen only once and then resolve itself, or does it keep duplicating excutions? It’s possible that when a workflow is edited, the previous version scheduled trigger isn’t automatically updated or disabled (just a hypothesis bug)..

Un-publishing the workflow and re-publishing it seems to fix it if done in the following order:

  1. Deactivate the workflow:
  2. Make changes to the workflow
  3. Re-activate workflow.

Thanks for the suggestion.

1 Like