feat(Node): add the Scheduler Node (#4223)

*  Create Schedule node with MVP structure

*  Add 24 increments for hours picker

* 🚨  Lintfix

* Add timestamp, add hour minute and cron expression

* Fix bug where there was one extra interval object

* Fix default value from fixedCollection

* 🐛 UI fixes

* 🎨 Changed logic to reflect UI fixes

* Fix auto intitialising

* Deprecated interval and cron in favor of schedule node

* 🐛 Ui fixes

* 🐛 Fix issue with week intervals

* 🚨 Lint fixes

* change order of days in the week to chronological order
This commit is contained in:
agobrech
2022-10-18 13:59:17 +02:00
committed by GitHub
parent 1aa21ed3df
commit 128c3b83df
8 changed files with 555 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ export class Cron implements INodeType {
icon: 'fa:calendar',
group: ['trigger', 'schedule'],
version: 1,
hidden: true,
description: 'Triggers the workflow at a specific time',
eventTriggerDescription: '',
activationMessage:
@@ -69,7 +70,9 @@ export class Cron implements INodeType {
const timezone = this.getTimezone();
// Start the cron-jobs
const cronJobs = cronTimes.map(cronTime => new CronJob(cronTime, executeTrigger, undefined, true, timezone));
const cronJobs = cronTimes.map(
(cronTime) => new CronJob(cronTime, executeTrigger, undefined, true, timezone),
);
// Stop the cron-jobs
async function closeFunction() {