Skip to main content

RQ Retry and Scheduler

Project description

Build Status Coverage Status

RQ Retry Scheduler

RQ Retry Scheduler extends the RQ worker class to provide functionality to enqueue jobs based on time.

Additionally, it provides a worker that will automatically retry failed jobs using a backoff scheme.



The rq_retry_scheduler.Queue class can be used as a drop in replacement for rq.Queue. It provides two additional enqueuing methods:

  • enqueue_at - Enqueue the job at the specified time. The time should be a datetime.datetime object with the UTC timezone.
  • enqueue_in - Enqueue the job after the specified amount of time. The time should be a datetime.timedelta object.

Additionally, two other methods are available enqueue_job_at and enqueue_job_in which work like the above methods but take a rq.Job object as the paramter.


In order to move jobs from the schedule queue into the proper RQ queue a scheduler needs to be ran. This can be accomplished via the rqscheduler script. Additionally, you can extend from rq_retry_scheduler.Scheduler to customize the functonality.


A worker is provided that will requeue jobs that fail using a defiend backoff strategy. The worker is designed to use the functionality from the Queue class to control the backoff.

The worker can be used by using the -w option to rq worker: rq worker -w 'rq_rety_scheduler.Worker.

The backoff times and total attempts is controlled by Worker.retry_delays.


Install via pip

pip install rq-retry-scheduler


This package was based heavily on the work of RQ Scheduler.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rq-retry-scheduler, version 0.1.0b2
Filename, size File type Python version Upload date Hashes
Filename, size rq-retry-scheduler-0.1.0b2.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page