Skip to main content

Pseudo cron for Django

Project description

pseudo-cron

Pseudo Cron Middleware for Django

Rationale

Schedule tasks for periodic execution without crontab.

Support

Supports: Python 3.9.

Supports Django Versions: 3.2.23

Installation

$ pip install pseudo_cron

Usage

Add pseudo_cron to INSTALLED_APPS.

Run migrations:

python manage.py migrate

Add the middleware:

MIDDLEWARE = [
    ...,
    'pseudo_cron.middleware.CronMiddleware'
]

Add a cron.py module to your app and schedule your periodic task:

from pseudo_cron.decorators import schedule_job


@schedule_job(24 * 60 * 60)  # Run every 24 hrs
def my_task():
    ...

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

pseudo_cron-1.0.4.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

pseudo_cron-1.0.4-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page