Skip to main content

Periodic/cron task scheduling for django-tasks. Backend-agnostic replacement for celery-beat.

Project description

django-periodic-tasks

Periodic/cron task scheduling for django-tasks. Backend-agnostic replacement for celery-beat + django-celery-beat.

Installation

pip install django-periodic-tasks

Add to INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    "django_periodic_tasks",
]

Usage

Define scheduled tasks

from django_tasks import task
from django_periodic_tasks import scheduled_task

@scheduled_task(cron="0 5 * * *", name="daily-report")
@task()
def daily_report() -> None:
    ...

Run the scheduler

Enable the autostart setting so the scheduler runs as a daemon thread inside your Django process:

# settings.py
PERIODIC_TASKS_AUTOSTART = True

Or run it as a standalone process:

python manage.py run_scheduler

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_periodic_tasks-0.2.1.tar.gz (715.5 kB view details)

Uploaded Source

Built Distribution

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

django_periodic_tasks-0.2.1-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file django_periodic_tasks-0.2.1.tar.gz.

File metadata

  • Download URL: django_periodic_tasks-0.2.1.tar.gz
  • Upload date:
  • Size: 715.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for django_periodic_tasks-0.2.1.tar.gz
Algorithm Hash digest
SHA256 54822a0b9d35dc11d95079b7ae300468c9074acccee52b65c1aeda2abcdfa2a9
MD5 4d46abd2ff5b5da36098129c067eecbe
BLAKE2b-256 1e219c12682457ce15f075450d3ddab29d4b7f81430f45f3d1bc432e500706bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_periodic_tasks-0.2.1.tar.gz:

Publisher: .gitlab-ci.yml on thelabnyc/django-periodic-tasks

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_periodic_tasks-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_periodic_tasks-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 340a3f541d62b9f93c0c123eaf7fb6f4ca1e7a966c3528c76a74978e033a5064
MD5 305026001b227818e4b86bead400f4f2
BLAKE2b-256 cd79bf78166bac6be33b54a88ab726a41ff1fcb0410b855924f272d2ff3756bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_periodic_tasks-0.2.1-py3-none-any.whl:

Publisher: .gitlab-ci.yml on thelabnyc/django-periodic-tasks

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

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