Adding repeated jobs using embedded mode was said not possible without setInterval but it seems possible afterall ?
#17
-
Here a small vid of what I see: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @arthurvanl! Yes, repeated jobs work natively in embedded mode — no const queue = new Queue('my-queue', { embedded: true });
// This works perfectly in embedded mode
await queue.add('recurring-task', { key: 'value' }, {
repeat: { every: 5000 }, // every 5 seconds
});The flow is:
So what you're seeing is the correct, expected behavior. No need for Also — v2.5.8 just shipped with fixes for updating repeated job data and typed Worker events. Worth upgrading if you haven't already! |
Beta Was this translation helpful? Give feedback.

Hi @arthurvanl!
Yes, repeated jobs work natively in embedded mode — no
setIntervalneeded. When you passrepeat: { every: N }in the job options, bunqueue's internalhandleRepeat()automatically schedules the next execution after each completion.The flow is:
handleRepeat()pushes a new job withdelay = repeat.everylimitis reached (if set)So what you're seein…