I want to create. a custom node that it can set certain time to executive but it will not prevent the next node to executive. I used two methods, CronJob and setTimeout, but it will hold the workflow until it complete. Is there a solution to resolve this?
this is the node config in editor ui:
this is how the workflow execute:
this is my code with cronJob:
const cronJobs: CronJob[] = [];
for (const cronTime of cronTimes) {
const index:number = cronTimes.indexOf(cronTime)
cronJobs.push(new CronJob(cronTime, () => executeTrigger(index), undefined, true, timezone));
}
this is my code with setTimeout
for (const cronTime of cronTimes) {
const index:number = cronTimes.indexOf(cronTime)
setTimeout(() => {
executeTrigger(index)
}, cronTime)
}
I use this.emit, it seems it can stop the node
this.emit([this.helpers.returnJsonArray([returnData])]);
But I just want the workflow to go ahead without waiting the timer or cronjob complete.