Skip to main content

Task scheduling for Django 6.0 task backends

Project description

from datetime import timedeltafrom dev.settings import INSTALLED_APPS

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

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

Installation

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

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",))

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_scheduled_tasks-0.1.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_scheduled_tasks-0.1.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file django_scheduled_tasks-0.1.2.tar.gz.

File metadata

  • Download URL: django_scheduled_tasks-0.1.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","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}

File hashes

Hashes for django_scheduled_tasks-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d37078bcf1dc56ca22070bdc02c2491057af5442deab975cf399e87358384484
MD5 bbfce52979cad7bba4dfd9731e26fc62
BLAKE2b-256 c0a3b03aa9ccd13b24ec01771ea8093e523eb025465d89b6c4eccf57fcff612f

See more details on using hashes here.

File details

Details for the file django_scheduled_tasks-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: django_scheduled_tasks-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","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}

File hashes

Hashes for django_scheduled_tasks-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 af1fb5c114b109f3f5b4ad57aac1a67aa9065a3f693540c261d2bacc51343558
MD5 c2de55f387cde94ed611ebd88e2ddc3b
BLAKE2b-256 b3e7baaae8117274e7178186b39d9f1de5db21b1e2da1a67289ad656e909b070

See more details on using hashes here.

Supported by

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