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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d37078bcf1dc56ca22070bdc02c2491057af5442deab975cf399e87358384484
|
|
| MD5 |
bbfce52979cad7bba4dfd9731e26fc62
|
|
| BLAKE2b-256 |
c0a3b03aa9ccd13b24ec01771ea8093e523eb025465d89b6c4eccf57fcff612f
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af1fb5c114b109f3f5b4ad57aac1a67aa9065a3f693540c261d2bacc51343558
|
|
| MD5 |
c2de55f387cde94ed611ebd88e2ddc3b
|
|
| BLAKE2b-256 |
b3e7baaae8117274e7178186b39d9f1de5db21b1e2da1a67289ad656e909b070
|