Duplicate data when configuring Schedule Trigger and node code in n8n

I have a workflow triggered by the Schedule Trigger node. I configured it to run once every 5AM. When I click test workflow, it only runs once. But when I set it to automatic, it runs 3-4 times.

Node Schedule Trigger is as shown in the image.
Node Code:
const today = new Date();
today.setDate(today.getDate() - 1);
const formattedDate = today.toISOString().split(‘T’)[0];
return [{ date: formattedDate }];

Information on your n8n setup

  • **n8n version: 1.91.3
  • **Database (default: SQLite): mySQL
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • **Operating system: Self host



odd, and u dont have any other trigger nodes? maybe try but webhook see if it does the same, but I haven’t seen this issue tbh

1 Like

I have 2 similar workflows to get data from 1 day and 3 days ago. I set the Schedule Trigger to run only once a day at 3am and 5am, and both repeat.

can u share u workflow maybe can test, or try a new instance see if its the code or instance?

1 Like

Can I send it to you via text?

maybe a sharing link or something?

I deleted 1 process and changed it to what is in the file, but it still executes 3 times.
Link

@Marketing_Human I tested with that, am not seeing this issue, you mentioned you installed with npm? is this is dedicated server? what os?

I installed it on Shared Hosting using npm, not a dedicated server like docker.

1 Like

@Marketing_Human maybe there something misconfigured and crons arn’t running properly? have you got dockers locally / dev container?

Maybe try run test locally see if you face same issue,

I made this below, which is what I use locally, before making changes in my cloud instance.

Hope this helps,

Samuel