Fix: Background-Jobs did not run automatically.
* Had to make sure `this` referred to `task` in `task.run()`.
This commit is contained in:
parent
8c93a47682
commit
9ad9ffabf7
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue