From f69cfbcbc5516a854adbbc29b259d08e65a19705 Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Sun, 10 Nov 2024 00:53:46 +0100 Subject: [PATCH] fix(repeatable): only apply immediately in the first iteration --- src/classes/job-scheduler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/job-scheduler.ts b/src/classes/job-scheduler.ts index 29820c2eab..7c0e6596b7 100644 --- a/src/classes/job-scheduler.ts +++ b/src/classes/job-scheduler.ts @@ -71,7 +71,7 @@ export class JobScheduler extends QueueBase { const prevMillis = opts.prevMillis || 0; // Check if we have a start date for the repeatable job - const { startDate, ...filteredRepeatOpts } = repeatOpts; + const { startDate, immediately, ...filteredRepeatOpts } = repeatOpts; if (startDate) { const startMillis = new Date(startDate).getTime(); now = startMillis > now ? startMillis : now;