Question About Expected Behavior for Repeating Jobs
Created by: andrewburgess
Bull version: 3.0.0-rc.2
I'm using repeating jobs with a specific job id to schedule a task to run at a specific hour every day. I have the process set up so that it runs queue.add on startup to ensure that the job exists. Looking through the queue implementation, every call to queue.add will execute nextRepeatableJob, which calculates the next iteration based on what is currently in bull.
Based on my current implementation, I always call queue.add to ensure the job is scheduled. If I restart the process 10 times in a row, then I will have 10 jobs scheduled out for the next 10 days, and each time a job completes, it will continue to maintain 10 future jobs.
Is this expected behavior? My initial assumption was that only the immediate next interval would be scheduled, especially when specifying a unique jobId.