fix(core): update

This commit is contained in:
Philipp Kunz 2020-09-02 14:09:21 +00:00
parent 725102d02c
commit ac2edd6d74
2 changed files with 7 additions and 3 deletions

View File

@ -44,4 +44,4 @@
"browserslist": [ "browserslist": [
"last 1 chrome versions" "last 1 chrome versions"
] ]
} }

View File

@ -64,8 +64,12 @@ export class CronManager {
* stops all cronjobs * stops all cronjobs
*/ */
public stop() { public stop() {
this.status = 'stopped'; if (this.status === 'started') {
this.executionTimeout.cancel(); this.status = 'stopped';
this.executionTimeout.cancel();
} else {
console.log(`You tried to stop a CronManager that was not actually started.`);
}
for (const cron of this.cronjobs.getArray()) { for (const cron of this.cronjobs.getArray()) {
cron.stop(); cron.stop();
} }