Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
Bull queue nestjs not processing the job at correct time

I am trying to create a time in milliseconds to pass it to delay using bull queue. I can correctly get time for the processing of the job, but somehow the job is not being called at a specific time. Some time it take more than 30 or 45 seconds to process the job from it's actual start of time.

for example if delay time is for 2 minutes. it execute in 2 minutes and 45 seconds. I am unable to find the reason. I want it to run only at 2 minutes. Below is my code

const startTime = moment().tz(timeZone).set('second', 0).valueOf();
const endTime = moment(time)
      .subtract(timeToSubtract, 'minutes')
      .tz(timeZone)
      .set('second', 0)
      .valueOf();
const scheduleTime = endTime - startTime

this.queue.add(
     'test-queue',
      {
        mesage,
      },
      {
        delay: scheduleTime,
        removeOnComplete: true,
      }
    );
about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!