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.2.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for pseudo_cron-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93d97bb365b3a64ffc4950184e35a174a23d1158ebfaafe36020fbb6463013b6 |
|
MD5 | d4e881f7eff4eedc1e34b818d493550d |
|
BLAKE2b-256 | 293d3efbd1c4d0464c889da6ba9f5d0c083e2007948e7a07849ce81ea250ec68 |