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
  • #1987
Closed
Open
Issue created Mar 01, 2021 by Adam Lounds@adamlounds

Enhancement: Recurrence Rule (rfc 5545, "rrule") support for repeating jobs

Enhancement Request

Support rrule (rfc5545) syntax as well as cron syntax for repeating jobs

paymentsQueue.add(paymentsData, {repeat: {rrule: 'DTSTART:20210401T23:59:59Z\nFREQ=DAILY;COUNT=2'}});

Recurrence rules are much more flexible than cron specifications, supporting things like "every monday and wednesday", or "the last thursday of the month, for five months". There's a js library to parse/validate rrules, which can generate the next Date the job should be run via

const rrule = rrulestr('DTSTART:20120201T023000Z\nRRULE:FREQ=MONTHLY;COUNT=5')
const nextRun = rrule.after(new Date);

This should be reasonably straightforward to add to getNextMillis, but rrule has some "quirks" if the system is not set to run in the UTC timezone.

Assignee
Assign to
Time tracking