fix: provide step.parameters to Scheduler triggers

This commit is contained in:
Ali BARIN
2022-09-18 14:58:22 +02:00
parent 4183884537
commit 58565fddae
6 changed files with 15 additions and 18 deletions

View File

@@ -1,12 +1,12 @@
import { DateTime } from 'luxon';
import type { IJSONObject, IJSONValue, ITrigger } from '@automatisch/types';
import type { IStep, IJSONValue, ITrigger } from '@automatisch/types';
import { cronTimes, getNextCronDateTime, getDateTimeObjectRepresentation } from '../utils';
export default class EveryDay implements ITrigger {
triggersOnWeekend?: boolean;
hour?: number;
constructor(parameters: IJSONObject) {
constructor(parameters: IStep["parameters"]) {
if (parameters.triggersOnWeekend) {
this.triggersOnWeekend = parameters.triggersOnWeekend as boolean;
}