fix(core): update
This commit is contained in:
parent
d16fd8b69b
commit
c8b455b8e2
@ -46,10 +46,17 @@ export class CronManager {
|
|||||||
nextRunningCronjob = cronJob;
|
nextRunningCronjob = cronJob;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.executionTimeout = new plugins.smartdelay.Timeout(nextRunningCronjob.getTimeToNextExecution());
|
if (nextRunningCronjob) {
|
||||||
console.log(
|
this.executionTimeout = new plugins.smartdelay.Timeout(nextRunningCronjob.getTimeToNextExecution());
|
||||||
`Next CronJob scheduled in ${this.executionTimeout.getTimeLeft()} milliseconds`
|
console.log(
|
||||||
);
|
`Next CronJob scheduled in ${this.executionTimeout.getTimeLeft()} milliseconds`
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.executionTimeout = new plugins.smartdelay.Timeout(1000);
|
||||||
|
console.log('no cronjobs specified! Checking again in 1 second');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
await this.executionTimeout.promise;
|
await this.executionTimeout.promise;
|
||||||
} while (this.status === 'started');
|
} while (this.status === 'started');
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user