Skip to main content


Project description


Run tasks at a scheduled time

PyPI version


pip install

pip install dj-scheduledtasks

add to installed apps:


Getting started

from scheduledtasks.models import ScheduledTask

Adding a reverse lookup to your model

You might want to be able to access the list of scheduled tasks on a model. To make this easy, you can add a GenericRelation field

from django.contrib.contenttypes.fields import GenericRelation
from scheduledtasks.models import ScheduledTask

class Todo(models.Model):
    scheduled_tasks = GenericRelation(ScheduledTask)

You can then access scheduled_tasks_set just as you would any other ForeignKey field

Schedule a task:

Explicit schedule

# minimal usage
# minimal usage

Schedule from a related object

You can also schedule infer the scheduled time from an object by passing the object instance, a field and an offset. e.g.:

# run a task 60 minutes after the due date

.. or just use the model directly

Create a task

Ways to run a task

Cleanup old tasks

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

dj-scheduledtasks-0.0.3.tar.gz (4.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page