From 93111fec6196cf7e12f7d95a35011684c6b8ef35 Mon Sep 17 00:00:00 2001 From: Pierre Cavin Date: Sun, 29 Oct 2023 10:58:33 +0100 Subject: [PATCH] revert: revert "fix: re-add runOnce property to CronJob (#751)" This reverts commit a61d8c95057b6055a2fe0f18896a098f5d0266e0. --- src/job.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/job.ts b/src/job.ts index e89b1377..1201d653 100644 --- a/src/job.ts +++ b/src/job.ts @@ -21,10 +21,6 @@ export class CronJob { ? CronOnCompleteCallback : undefined; - get runOnce(): boolean { - return this.cronTime.realDate; - } - private _timeout?: NodeJS.Timeout; private _callbacks: CronCallback>[] = []; @@ -259,7 +255,7 @@ export class CronJob { this.running = false; // start before calling back so the callbacks have the ability to stop the cron job - if (!this.runOnce) { + if (!this.cronTime.realDate) { this.start(); }