mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Protect against duplicate cron registration (#18005)
This commit is contained in:
@@ -5,6 +5,7 @@ import type {
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
ITriggerResponse,
|
||||
Cron,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
@@ -451,7 +452,10 @@ export class ScheduleTrigger implements INodeType {
|
||||
if (this.getMode() !== 'manual') {
|
||||
for (const { interval, cronExpression, recurrence } of rules) {
|
||||
try {
|
||||
const cron = { expression: cronExpression, recurrence };
|
||||
const cron: Cron = {
|
||||
expression: cronExpression,
|
||||
recurrence,
|
||||
};
|
||||
this.helpers.registerCron(cron, () => executeTrigger(recurrence));
|
||||
} catch (error) {
|
||||
if (interval.field === 'cronExpression') {
|
||||
|
||||
Reference in New Issue
Block a user