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.1.0a5.tar.gz (695.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.1.0a5-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file django_periodic_tasks-0.1.0a5.tar.gz.

File metadata

  • Download URL: django_periodic_tasks-0.1.0a5.tar.gz
  • Upload date:
  • Size: 695.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for django_periodic_tasks-0.1.0a5.tar.gz
Algorithm Hash digest
SHA256 1d382eae7da4f791c0ee070fed873dacd0fd48a67f3753219cbaa94564d3b62c
MD5 dd69f657b4c10a8df4942b5dec69c09a
BLAKE2b-256 3403b2455ed458656917686d30023195ae270efbeecd4b1afbab6fbe58aa46e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_periodic_tasks-0.1.0a5.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.1.0a5-py3-none-any.whl.

File metadata

File hashes

Hashes for django_periodic_tasks-0.1.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 f6d2e43967eaa06ed437df67ab0c92ff4381be448b0e4fd8a3ca05fa5c448fec
MD5 6d9a27f100f16ff71b0ca5372dd22674
BLAKE2b-256 b71218f401ef79ddaa95c98243643883759d55df642dbe4cbccbb33c84227a87

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_periodic_tasks-0.1.0a5-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