Skip to content

Commit

Permalink
fix(repeatable): only apply immediately in the first iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Nov 10, 2024
1 parent a8553db commit f69cfbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/classes/job-scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f69cfbc

Please sign in to comment.