Skip to main content

Django Tasks Scheduler

Django CI badge badge

Documentation can be found in https://django-tasks-scheduler.readthedocs.io/

Introduction Video

Django Tasks Scheduler Introduction

Watch this introduction video to learn about django-tasks-scheduler and its features.

Usage

  1. Update settings.py to include scheduler configuration:
import os
from typing import Dict
from scheduler.types import SchedulerConfiguration, Broker, QueueConfiguration

INSTALLED_APPS = [
    # ...
    "scheduler",
    # ...
]
SCHEDULER_CONFIG = SchedulerConfiguration(
    EXECUTIONS_IN_PAGE=20,
    SCHEDULER_INTERVAL=10,
    BROKER=Broker.REDIS,
    CALLBACK_TIMEOUT=60,  # Callback timeout in seconds (success/failure/stopped)
    # Default values, can be overridden per task/job
    DEFAULT_SUCCESS_TTL=10 * 60,  # Time To Live (TTL) in seconds to keep successful job results
    DEFAULT_FAILURE_TTL=365 * 24 * 60 * 60,  # Time To Live (TTL) in seconds to keep job failure information
    DEFAULT_JOB_TTL=10 * 60,  # Time To Live (TTL) in seconds to keep job information
    DEFAULT_JOB_TIMEOUT=5 * 60,  # timeout (seconds) for a job
    # General configuration values
    DEFAULT_WORKER_TTL=10 * 60,  # Time To Live (TTL) in seconds to keep worker information after last heartbeat
    DEFAULT_MAINTENANCE_TASK_INTERVAL=10 * 60,  # The interval to run maintenance tasks in seconds. 10 minutes.
    DEFAULT_JOB_MONITORING_INTERVAL=30,  # The interval to monitor jobs in seconds.
    SCHEDULER_FALLBACK_PERIOD_SECS=120,  # Period (secs) to wait before requiring to reacquire locks
)
SCHEDULER_QUEUES: Dict[str, QueueConfiguration] = {
    "default": QueueConfiguration(URL="redis://localhost:6379/0"),
}
  1. Update urls.py to include scheduler urls:
from django.urls import path, include

urlpatterns = [
    # ...
    path("scheduler/", include("scheduler.urls")),
]
  1. Run migrations:
python manage.py migrate
  1. Check out the admin views:

Local development environment

You can install pre-commit hook in the repo to add it as a git hook by running: pre-commit install. It is configured to check all change files based on configuration in .pre-commit-config.yaml.

Sponsor

django-tasks-scheduler is developed for free.

You can support this project by becoming a sponsor using this link.

Contributing

Interested in contributing, providing suggestions, or submitting bugs? See guidelines at this link.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_tasks_scheduler-4.3.0.tar.gz (101.7 kB view details)

Uploaded Source

Built Distribution

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

django_tasks_scheduler-4.3.0-py3-none-any.whl (162.5 kB view details)

Uploaded Python 3

File details

Details for the file django_tasks_scheduler-4.3.0.tar.gz.

File metadata

  • Download URL: django_tasks_scheduler-4.3.0.tar.gz
  • Upload date:
  • Size: 101.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for django_tasks_scheduler-4.3.0.tar.gz
Algorithm Hash digest
SHA256 94398e5aeb4a700b06ee6738b627febdb49921c32d4d64fad31371d8a3698267
MD5 3b95f8451341fa6e148c9bfb405f300f
BLAKE2b-256 179eb3f7bc467ab5b1d4ad4c2a8c41371a218d51270c17536d11975fe2947154

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tasks_scheduler-4.3.0.tar.gz:

Publisher: publish.yml on django-commons/django-tasks-scheduler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_tasks_scheduler-4.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tasks_scheduler-4.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 024d5a71eea5c48c8a20cd19e68c5c6cbf3a72da242af294e18d172c7b455c34
MD5 54a0b6eb0b832e58a41f623d8281ae00
BLAKE2b-256 67238828cf838ade3d11e641a20dab1f6af295744bfb5db32c70ab50413721e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tasks_scheduler-4.3.0-py3-none-any.whl:

Publisher: publish.yml on django-commons/django-tasks-scheduler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

4.3.0 This release

2 files

4.2.1

2 files

4.2.0

2 files

4.1.0

2 files

4.0.8

2 files

4.0.7

2 files

4.0.6

2 files

4.0.5

2 files

4.0.4

2 files

4.0.3

2 files

4.0.2

2 files

4.0.0

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 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