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
Delayed and Repeatable parameters together in one Job not working #431
Comments
If I comment-out the async function addJobs(){
await myQueue.add('job_delayed', {}, {
delay: 20000,
// repeat: {
// every: 5000,
// limit: 10
// }
});
} delay works well:
|
The delay cannot be combined with "every", we should definitively throw an exception to avoid misunderstandings. However there is the "startDate" property that you can use, however it only works with "cron" expressions, not with "every". Maybe this is a workaround for your case. |
Thanks for clarification, I need the job that will be started, for example, at 3 hours after start, and repeats unlimited time every 10 minutes. If this cannot be combined, it's better to implement this in worker logic, or you can recommend some better solution? |
Why cant you use a cron expression like * */10 * * * * ? |
Because I need the startup delay for 3 hours, together with |
I wrote above you can use "startDate" too. |
Yeah, thanks, this is the solution too! |
I need to use both
delay
andrepeat
parameters in BullMQ Job instance, for make a delay of first job execution, so I compose code like this:And the problem is that the first job launch is happens at 5 sec delay, instead of 20 sec, here is output:
The text was updated successfully, but these errors were encountered: