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.2.1.tar.gz (95.9 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.2.1-py3-none-any.whl (155.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_tasks_scheduler-4.2.1.tar.gz
  • Upload date:
  • Size: 95.9 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.2.1.tar.gz
Algorithm Hash digest
SHA256 d2ad863dc1ab3bbe77e519d381d74ab6f30c2c07b030f757d986a7a4be75e8ac
MD5 15d427ab6652315aedd7f8a4559087e3
BLAKE2b-256 05bd1d2c6853eacd58c5a37faaa1a1e58638085a080e5a2586dacb8bc8d4237e

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tasks_scheduler-4.2.1.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.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tasks_scheduler-4.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23f86a028b5b731f77d561d86d47555b6223ef42f0e641b23c32bb43d3b29afb
MD5 b658c3361c5abc4d79672cc1f62c4b1c
BLAKE2b-256 de8465764d99ade1830b99188ec65ac8b67ebc2a1b459614a0859bed50aafdd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tasks_scheduler-4.2.1-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.2.1 This release

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