Metadata-Version: 2.1
Name: pseudo_cron
Version: 1.0.2
Summary: Pseudo cron for Django
Home-page: https://github.com/bboogaard/pseudo_cron
Author: Bram Boogaard
Author-email: padawan@hetnet.nl
License: MIT License
Keywords: Django cron
Classifier: Development Status :: 3 - Alpha
Description-Content-Type: text/markdown
Requires-Dist: pytest
Requires-Dist: pytest-cov
Requires-Dist: pytest-django==4.5.2
Requires-Dist: django==3.2.23

# 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

```shell
$ pip install pseudo_cron
```

## Usage

Add `pseudo_cron` to `INSTALLED_APPS`.

Run migrations:

```python
python manage.py migrate
```

Add the middleware:

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

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

```python
from pseudo_cron.decorators import schedule_job


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