Weird behaviour with repeat jobs - triggered at wrong time
Created by: tschaefe
Hi,
I have a really weird behaviour that I cannot find the reason for.
My current setup: I have a queue that holds around 40 repeat jobs, all with a unique name, some of them have the same cron iteration. In addition to that I have a special repeat job in the same queue, that is running every hour to check if new repeat jobs needs to be added or if some needs to be updated or removed, just to ensure that they are always there (like a queue manager job).
The Problem: Whenever this regular cron job (hourly) is running (and almost he does nothing, just calls getRepeatJobs() in generell), it seems that he will also force one of the other repeat jobs to be processed. For Example: The hourly job is scheduled like this: "40 * * * *" So when he is executed at: Process Time: 2017-10-26 02:40:00 (hourly job)
Then this job is processed as well: JobId: repeat:10f2bb94008cac89239d9f640cfd0357:1508994000000 Configuration for cron is this: "0 0 5 * * 1-5"
The timestamp in the JobId resolves to 05:00 a.m. and not 2:40 a.m.
It seems also that this processing of an additional job is not just related to this hourly job. Other repeat jobs (when they will be processed) can also force this behaviour. But they will not always do this. really weird.
Any ideas what could went wrong?
Current used version: 3.4.0 Redis 3.2