New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong delay on Repeatable #471
Comments
Time is divided by 345600000 and then jobs are repeated at every such slot. This is so that it works in a distributed environment without job duplicates. |
Thanks for the quick response. The job starts 8 hours earlier than intended. How can you avoid this?
|
You can try using the "startDate" option and a suitable "cron" expression. |
There is an error in the calculation logic. I understand that you wanted to spread the execution of tasks in time, but now this is unpredictable. No one can know exactly when the task will start. "startDate" not work too |
startDate only works with cron expressions, that will help you to determine exactly when every iteration will be executed. |
Thanks for the help. I understand, but I cannot imagine a case when the difference of 8 hours is not critical for a scheduled task. And if the interval is not 4 days, but 40, then it turns out the task will start about a week earlier, if you're lucky. Cron is often not suitable because if you plan every three days, then it breaks the month into sections of 3 and they do not coincide with the beginning of the task again |
@cheluskin you are just considering a case where "repeat.every" is not suitable, but many people is using this feature in many other scenarios happily. You can always implement your repeat using the delay feature so that it fits your needs. |
"bullmq": "^1.15.1",
why delay 319174534?
The text was updated successfully, but these errors were encountered: