Skip to main content

Django Future Tasks

PyPI version Run linter and tests Codecov

A library to create periodic, cron-like tasks or single tasks with a specified execution/start time and schedule it to run in the future.

Installation

  1. Install using pip:
pip install django-future-tasks
  1. Add the library to your INSTALLED_APPS list.
INSTALLED_APPS = [
    ...
    'django_future_tasks',
    ...
]
  1. Configure the task types in your settings.py according to your needs:
# within settings.py

FUTURE_TASK_TYPE_ONE = "task_one"
FUTURE_TASK_TYPE_TWO = "task_two"

FUTURE_TASK_TYPES = (
    (FUTURE_TASK_TYPE_ONE, _("Task 1")),
    (FUTURE_TASK_TYPE_TWO, _("Task 2")),
)

Usage

To receive a signal, register a receiver function using the signal future_task_signal and the task type as sender. The instance is the FutureTask object.

@receiver(future_task_signal, sender=intern(settings.FUTURE_TASK_TYPE_ONE))
def my_function(sender, instance, **kwargs):
    # do something

Command for starting the future task processing

python manage.py process_future_tasks

Command for starting the periodic future task processing

python manage.py populate_periodic_future_tasks

Django Compatibility Matrix

If your project uses an older version of Django or Django Rest Framework, you can choose an older version of this project.

This Project Python Version Django Version
1.3.* 3.9, 3.10, 3.11, 3.12, 3.13 4.2, 5.0, 5.1
1.2.* 3.8, 3.9, 3.10, 3.11 3.2, 4.1, 4.2
1.1.* 3.8, 3.9, 3.10, 3.11 3.2, 4.1, 4.2
1.0.* 3.8, 3.9, 3.10, 3.11 3.2, 4.0, 4.1

Metadata

Release files for django-future-tasks 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-future-tasks 1.3.1
File Size Uploaded
django-future-tasks-1.3.1.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-future-tasks 1.3.1
File Interpreter ABI Platform
django_future_tasks-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 25.9 kB

Release files / django-future-tasks-1.3.1.tar.gz

Download URL django-future-tasks-1.3.1.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a0d370e39cdec48610e383af676b94794cc36c968854f33ee52ceb32f0ad99c6
BLAKE2b-256 checksum
How to use checksums
f3ca31251c2989cbd7e9e36466067344b409a59982aab8f6af8565e543b47da6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / django_future_tasks-1.3.1-py3-none-any.whl

Download URL django_future_tasks-1.3.1-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b94d4739a54f5ff97cb29717e789979e4bccd4c678736ea7ad3f5aa9cf15cc9
BLAKE2b-256 checksum
How to use checksums
feaed9fa1a45eae603636c52ab0dc8252fd373702b5b36e7b4a63f804da4d696
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page