Fixing expression to check for 7AM
This commit is contained in:
parent
e7bff228c6
commit
9e8f2598f5
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ export class ReservationsCronService {
|
|||
.set('millisecond', 0)
|
||||
|
||||
while (not7AM) {
|
||||
not7AM = time7AM.isBefore(dayjs()) && time7AM.diff(dayjs()) >= waitTime // current time is more than 100ms from 7am
|
||||
not7AM = !time7AM.isBefore(dayjs()) && time7AM.diff(dayjs()) >= waitTime // current time is more than 100ms from 7am
|
||||
if (!not7AM) break
|
||||
await new Promise((res) => setTimeout(res, waitTime)) // wait for waitTime and then try again
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue