Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Issues
  • #747
Closed
Open
Issue created Oct 20, 2017 by Administrator@rootContributor

BUG: Repeat Jobs stop processing

Created by: mbernardini

We're noticing an issue that when using repeat jobs, the jobs eventually stop processing with no indication of an error. The reason that the jobs stop is that the next job does not get added to the queue. I ran NODE_DEBUG=bull and added some additional debug statements, so I was able to figure out that nextRepeatableJob function is being called but this check is causing the next job to not get added because now is a few milliseconds before millis (the time the job is supposed to get executed).

This script reproduces the issue:

const Queue = require('bull');
const prefix = 'test';
const redis = {host: 'localhost', port: 6379};

const cronQueue = new Queue('cronQueue', {redis, prefix});
cronQueue.process('cron', () => {
  console.log(`[${(new Date()).toISOString()}] Job Processing...`);
});
cronQueue.add('cron', {}, {repeat:{cron:'*/10 * * * *'}, jobId: 'cronJob', removeOnComplete: true});

Output:

[2017-10-20T17:20:00.012Z] Job Processing...
[2017-10-20T17:29:59.987Z] Job Processing...
// Theres no more out at this point because the second job executed prior  to the scheduled time

For reference: Bull version: 3.3.2 Node Version: 6.9.0 Redis Version: 2.8.19 and 3.2.4 I've seen this issue both running Redis and Node on a single machine as well as in our cloud environment (clustered Redis and multiple Node instances)

Assignee
Assign to
Time tracking