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.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for pseudo_cron-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6af621dd400ae586472e4a71e23f19f6875d9a277b728d42eb46c20249f65bc2 |
|
MD5 | 1ab61b93f411b930cc331c88a98b56e5 |
|
BLAKE2b-256 | 0f4b37d074f9b1bf5c724773e5490989ce62cdf1f87fd6ff4194ff51a96e0c87 |