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
  • #558
Closed
Open
Issue created Jun 02, 2017 by Administrator@rootContributor

Question About Expected Behavior for Repeating Jobs

Created by: andrewburgess

Bull version: 3.0.0-rc.2

I'm using repeating jobs with a specific job id to schedule a task to run at a specific hour every day. I have the process set up so that it runs queue.add on startup to ensure that the job exists. Looking through the queue implementation, every call to queue.add will execute nextRepeatableJob, which calculates the next iteration based on what is currently in bull.

Based on my current implementation, I always call queue.add to ensure the job is scheduled. If I restart the process 10 times in a row, then I will have 10 jobs scheduled out for the next 10 days, and each time a job completes, it will continue to maintain 10 future jobs.

Is this expected behavior? My initial assumption was that only the immediate next interval would be scheduled, especially when specifying a unique jobId.

Assignee
Assign to
Time tracking