fix(cron): dont forget to compute next date

Introduced by #4626
This commit is contained in:
Julien Fontanet
2019-10-25 15:49:05 +02:00
parent 8753c02adb
commit 07526efe61
2 changed files with 3 additions and 2 deletions

View File

@@ -39,8 +39,8 @@ class Job {
this._isRunning = false
if (this._isEnabled) {
const now = Date.now()
scheduledDate = +schedule._createDate()
const now = schedule._createDate()
scheduledDate = +next(schedule._schedule, now)
const delay = scheduledDate - now
this._timeout =
delay < MAX_DELAY

View File

@@ -20,5 +20,6 @@
>
> Rule of thumb: add packages on top.
- @xen-orchestra/cron v1.0.6
- xo-server v5.52.0
- xo-web v5.52.0