Fix: Background-Jobs did not run automatically.

* Had to make sure `this` referred to `task` in `task.run()`.
This commit is contained in:
baldo 2021-02-22 21:48:39 +01:00
parent 8c93a47682
commit 9ad9ffabf7

View file

@ -122,7 +122,7 @@ function schedule(expr: string, job: Job): void {
true,
);
cron.schedule(expr, task.run);
cron.schedule(expr, () => task.run());
tasks['' + id] = task;
}