You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repeatable jobs with "every" parameter works wrong or have confusing documentation.
When i create job with { repeat: { every: 15 * 1000 } } params
i expect the job would be fired every 15 seconds since job created.
E.g. if it's created at 15:34:07 the job would run at 15:34:22, then 15:34:37 and so on.
But actually it would run at 15:34:15, 15:34:30, 15:34:45
Minimal, Working Test code to reproduce the issue.
constQueue=require('bull');constmyqueue=newQueue('q');console.log(newDate,'- Adding job');(async()=>{// Repeat every 15 secondsconstmyJob=awaitmyqueue.add({foo: 'bar'},{jobId: 'every_15_seconds',repeat: {every: 15*1000,},},);myqueue.process(function(job,done){console.log(newDate,'- Running job');done();});})();/*Excepted result:2020-09-14T16:28:08.884Z - Adding job2020-09-14T16:28:23.020Z - Running job2020-09-14T16:28:38.015Z - Running job2020-09-14T16:28:53.008Z - Running jobActual result:2020-09-14T16:28:08.884Z - Adding job2020-09-14T16:28:15.020Z - Running job2020-09-14T16:28:30.015Z - Running job2020-09-14T16:28:45.008Z - Running jobLooks like it runs every 15 seconds since day start, not the startDate nor time, when job was added. */
Bull version
3.18.0
Additional information
The text was updated successfully, but these errors were encountered:
Description
Repeatable jobs with "every" parameter works wrong or have confusing documentation.
When i create job with
{ repeat: { every: 15 * 1000 } }
paramsi expect the job would be fired every 15 seconds since job created.
E.g. if it's created at 15:34:07 the job would run at 15:34:22, then 15:34:37 and so on.
But actually it would run at 15:34:15, 15:34:30, 15:34:45
Minimal, Working Test code to reproduce the issue.
Bull version
3.18.0
Additional information
The text was updated successfully, but these errors were encountered: