Skip to main content

Provides scheduled jobs from the Django Admin using Django-RQ

Project description

Provides scheduled jobs management from the Django Admin using Django-RQ

Admin Screenshot

Admin Screenshot



  • Make sure you have Django-RQ up and running before you do anything. This app is just a simple admin plugin to manage your scheduled tasks and management commands.

  • Install the package with pip install django-rq-jobs

  • Add django_rq_jobs to INSTALLED_APPS in

        # other apps
  • Add RQ_JOBS_MODULE in A string or a tuple of strings designating all modules where you keep your jobs. Anything marked with the Django RQ’s @job decorator will show up in the admin.

    # A singe module:
    RQ_JOBS_MODULE = 'myapp.tasks'
    # or with multiple modules:
  • Run python migrate to create the job model.

  • Open your Django admin and find the RQ Jobs scheduled job section and schedule something.

  • Schedule the heartbeat python rqjobs with your favorite scheduler. This can be cron, Heroku scheduler or anything else you prefer. Make sure you set the heartbeat interval to something sensible; 5 or 10 minutes is usually enough, but run it every minute if you want. Execution of the jobs is deferred to RQ anyway.


  • Supports once, hourly, daily, weekly, monthly, quarterly and yearly scheduled tasks.
  • Limited run schedules: Set the ‘Repeats’ on a task to the maxium number of repeats you want. The task gets deleted once the counter reaches zero. Defaults to -1 for eternal.
  • Arguments are a dict: {'one': 1, 'two': 2, 'three': 3}
  • RQ Jobs will try to link a job to a queue task status in Django RQ. Usually these job reports don’t exist much longer than a few minutes unless they fail. So if you are seeing None in the RQ status, that usually means things went well.
  • If you haven’t run the heartbeat rqjobs for a while and missed some scheduled jobs, RQ Jobs will play catch-up with every heartbeat. This way limited run schedules don’t get compromised.

Scheduling Management Commands

If you want to schedule regular Django management commands, it’s easiest to add them using Django’s management wrapper. So if you wanted to schedule ` clearsessions’ :

from django.core import management

def clear_sessions():
    return management.call_command('clearsessions')

This will automagically appear as ‘Clear Sessions’ in the admin interface.


Impossible without the excellent Django-RQ and RQ projects. Thanks to Arrow for making dates easy.

Project details

Download files

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

Source Distribution

django-rq-jobs- (9.5 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page