Skip to main content

Django-scheduled-tasks: task scheduling for the Django tasks framework

A Django app that allows scheduling for the Django 6.0 task framework.

Installation & Usage

First, make sure your task backend is setup. I'd recommend starting with the database backend in django-tasks.

Then, add the scheduled tasks:

pip install django-scheduled-tasks

Add the django_scheduled_tasks module to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...,
    "django_scheduled_tasks",
]

define some tasks to run periodically, by wrapping around an existing task, either as a decorator or by calling periodic_task directly:

from django.tasks import task
from django_scheduled_tasks import periodic_task
from datetime import timedelta


# note the order of the decorators! Make sure periodic_task is above task
@periodic_task(interval=timedelta(hours=2))
@task
def run_hourly():
    ...


# or call periodic task with a task directly:
@task
def some_existing_task(some_arg: str):
    ...


periodic_task(interval=timedelta(hours=3), call_args=("some_arg_value",), task=some_existing_task)

For cron-style scheduling, use cron_task with a cron expression:

from django_scheduled_tasks import cron_task
from django.tasks import task

# Run at 9am every day
@cron_task(cron_schedule="0 9 * * *")
@task
def daily_report():
    ...


# Run at 9am in a specific timezone
@cron_task(cron_schedule="0 9 * * *", timezone_str="Europe/Brussels")
@task
def timezoned_scheduled_task():
    ...

Lastly, run one instance of the scheduler as a part of your application:

python manage.py run_task_scheduler

Metadata

Release files for django-scheduled-tasks 0.3.0

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-scheduled-tasks 0.3.0
File Size Uploaded Provenance Actions
django_scheduled_tasks-0.3.0.tar.gz 8.9 kB Without provenance Details for django_scheduled_tasks-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-scheduled-tasks 0.3.0
File Interpreter ABI Platform Actions
django_scheduled_tasks-0.3.0-py3-none-any.whl Python 3 none any Details for django_scheduled_tasks-0.3.0-py3-none-any.whl

Total release size: 22.5 kB

Release files / django_scheduled_tasks-0.3.0.tar.gz

Download URL django_scheduled_tasks-0.3.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e3fd429c7670954489b2613882a5bc8988e75c8069cf598c77c151bd430c4d81
BLAKE2b-256 checksum
How to use checksums
9e4c5660d1a77d895585e61e27b025244b23b36826231414ad94dc878f7b33a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / django_scheduled_tasks-0.3.0-py3-none-any.whl

Download URL django_scheduled_tasks-0.3.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
992ea04945b104d633fe29ec9b20930b72b37122f5b9fad9566e6a78b410d7f0
BLAKE2b-256 checksum
How to use checksums
7a2b4fa88def0e0fd76997b1af1f627d822dac03eee78fe71adc3609d657146e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for django-scheduled-tasks 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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