# 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():
...
```
Raw data
{
"_id": null,
"home_page": "https://github.com/bboogaard/pseudo_cron",
"name": "pseudo-cron",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Django cron",
"author": "Bram Boogaard",
"author_email": "padawan@hetnet.nl",
"download_url": "https://files.pythonhosted.org/packages/db/fc/de6e95b0e85453f48cb814822884eb376a02fad32daf45f06046f68f6337/pseudo_cron-1.0.4.tar.gz",
"platform": null,
"description": "# pseudo-cron\n\nPseudo Cron Middleware for Django\n\n## Rationale\n\nSchedule tasks for periodic execution without crontab.\n\n## Support\n\nSupports: Python 3.9.\n\nSupports Django Versions: 3.2.23\n\n## Installation\n\n```shell\n$ pip install pseudo_cron\n```\n\n## Usage\n\nAdd `pseudo_cron` to `INSTALLED_APPS`.\n\nRun migrations:\n\n```python\npython manage.py migrate\n```\n\nAdd the middleware:\n\n```python\nMIDDLEWARE = [\n ...,\n 'pseudo_cron.middleware.CronMiddleware'\n]\n```\n\nAdd a `cron.py` module to your app and schedule your periodic task:\n\n```python\nfrom pseudo_cron.decorators import schedule_job\n\n\n@schedule_job(24 * 60 * 60) # Run every 24 hrs\ndef my_task():\n ...\n```\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Pseudo cron for Django",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://github.com/bboogaard/pseudo_cron"
},
"split_keywords": [
"django",
"cron"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "436cb9260f706518cc4d68f27dafd7add174f1b59158f80b8486c1fb2053eaf6",
"md5": "493dfee029f59cbcef429863acd9bb45",
"sha256": "5fff3315a064ac09602ba82776b1b6a308f34747b5f175a0c244135c29a888b4"
},
"downloads": -1,
"filename": "pseudo_cron-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "493dfee029f59cbcef429863acd9bb45",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6286,
"upload_time": "2023-11-21T10:52:34",
"upload_time_iso_8601": "2023-11-21T10:52:34.731317Z",
"url": "https://files.pythonhosted.org/packages/43/6c/b9260f706518cc4d68f27dafd7add174f1b59158f80b8486c1fb2053eaf6/pseudo_cron-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dbfcde6e95b0e85453f48cb814822884eb376a02fad32daf45f06046f68f6337",
"md5": "0a93086a7f110bd8579084fe9c5d0a1c",
"sha256": "74c669ffbfa97f01e21b7ffa219d4df6998353febcd16fa1eeea52211d70016e"
},
"downloads": -1,
"filename": "pseudo_cron-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "0a93086a7f110bd8579084fe9c5d0a1c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4611,
"upload_time": "2023-11-21T10:52:36",
"upload_time_iso_8601": "2023-11-21T10:52:36.618012Z",
"url": "https://files.pythonhosted.org/packages/db/fc/de6e95b0e85453f48cb814822884eb376a02fad32daf45f06046f68f6337/pseudo_cron-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-21 10:52:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bboogaard",
"github_project": "pseudo_cron",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "pseudo-cron"
}