Name | django-celery-beat-rrule JSON |
Version |
0.0.3
JSON |
| download |
home_page | None |
Summary | Add a RruleDatabaseScheduler, automatically execute tasks based on custom rrule schedules |
upload_time | 2025-01-26 12:19:01 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | The BSD 3-Clause License The following is a BSD 3-Clause ("BSD New" or "BSD Simplified") license template. To generate your own license, change the values of OWNER, ORGANIZATION and YEAR from their original values as given here, and substitute your own.
Note: You may omit clause 3 and still be OSD-conformant. Despite its colloquial name "BSD New", this is not the newest version of the BSD license; it was followed by the even newer BSD-2-Clause version, sometimes known as the "Simplified BSD License". On January 9th, 2008 the OSI Board approved BSD-2-Clause, which is used by FreeBSD and others. It omits the final "no-endorsement" clause and is thus roughly equivalent to the MIT License.
Historical Background: The original license used on BSD Unix had four clauses. The advertising clause (the third of four clauses) required you to acknowledge use of U.C. Berkeley code in your advertising of any product using that code. It was officially rescinded by the Director of the Office of Technology Licensing of the University of California on July 22nd, 1999. He states that clause 3 is "hereby deleted in its entirety." The four clause license has not been approved by OSI. The license below does not contain the advertising clause.
This prelude is not part of the license.
OWNER = Regents of the University of California
ORGANIZATION = University of California, Berkeley
YEAR = 1998
In the original BSD license, both occurrences of the phrase "COPYRIGHT HOLDERS AND CONTRIBUTORS" in the disclaimer read "REGENTS AND CONTRIBUTORS".
License template
Copyright (c) $YEAR $OWNER, All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
django-celery-beat
rrule
dateutil
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# django-celery-beat-rrule
A [django-celery-beat](https://pypi.org/project/django-celery-beat/) plugin that adds a `RruleScheduler`.
It is based on the django-celery-beat's database scheduler and allows running tasks by just creating dateutil's rrule schedules.
# THIS PROJECT IS IN BETA, USE AT YOUR DISCRETION.
# Why?
`Django-celery-beat` is a wonderful library that already includes powerful schedulers like `crontab`, `interval` or `solar`.
But what if your schedule includes irregularities?
If you schedule an event on your calendar you are usually presented with a complex planner that allows you to schedule an event with multiple exceptions, breaks,
different time intervals that are too complicated to be handled by crontab. This is where `dateutil`'s rrule package comes in,
it allows to easily create complex schedules with groups and exceptions that cover much more ground than crontab.
This project is intended to make this integrating this package easier for running custom events on small to medium scale.
# How it works
A custom rrule-based `DatabaseScheduler` implementation uses an extended periodic task,
that adds a new JSON field storing the serialized rrule schedule.
Scheduler then is able to pick these tasks up as a regular celery-beat schedule and calculate the next execution date using rrule.after().
## Known issues
1. Potentially poor performance because of the `rrule.after()`'s computational overhead, specifically in complex rules with several exceptions.
2. Underlying issues with how rrule performs validation. There are several issues open on github describing how an RRULE can be created excluding ALL dates from execution and making their computation take too long.
# Installation
You can install django-celery-beat-rrule either via the Python Package Index (PyPI)
or from source.
To install using `pip`:
```bash
$ pip install --upgrade django-celery-beat-rrule
```
## Configuration
Add django_celery_beat_rrule to the list of installed apps
```python
INSTALLED_APPS = [
...,
'django_celery_beat_rrule',
]
```
Run django-celery-beat-rrule migrations
```bash
# make sure you have already installed django-celery-beat's migrations before you run this
$ python manage.py migrate django_celery_beat_rrule
```
If you change the Django `TIME_ZONE` setting your periodic task schedule
will still be based on the old timezone.
To fix that you would have to reset the "last run time" for each periodic task.
Raw data
{
"_id": null,
"home_page": null,
"name": "django-celery-beat-rrule",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "django-celery-beat, rrule, dateutil",
"author": null,
"author_email": "Vlad Tabakov <contact@vladtabakov.com>",
"download_url": "https://files.pythonhosted.org/packages/b4/95/eec4c9aa82e19dbe0167bc8f38a8d6b197ae839b56f2a988de276d3a4c3b/django_celery_beat_rrule-0.0.3.tar.gz",
"platform": null,
"description": "# django-celery-beat-rrule\n\nA [django-celery-beat](https://pypi.org/project/django-celery-beat/) plugin that adds a `RruleScheduler`.\nIt is based on the django-celery-beat's database scheduler and allows running tasks by just creating dateutil's rrule schedules.\n\n# THIS PROJECT IS IN BETA, USE AT YOUR DISCRETION.\n\n# Why?\n\n`Django-celery-beat` is a wonderful library that already includes powerful schedulers like `crontab`, `interval` or `solar`.\nBut what if your schedule includes irregularities?\nIf you schedule an event on your calendar you are usually presented with a complex planner that allows you to schedule an event with multiple exceptions, breaks, \ndifferent time intervals that are too complicated to be handled by crontab. This is where `dateutil`'s rrule package comes in,\nit allows to easily create complex schedules with groups and exceptions that cover much more ground than crontab.\n\nThis project is intended to make this integrating this package easier for running custom events on small to medium scale.\n\n# How it works\n\nA custom rrule-based `DatabaseScheduler` implementation uses an extended periodic task,\nthat adds a new JSON field storing the serialized rrule schedule. \nScheduler then is able to pick these tasks up as a regular celery-beat schedule and calculate the next execution date using rrule.after().\n\n\n## Known issues\n\n1. Potentially poor performance because of the `rrule.after()`'s computational overhead, specifically in complex rules with several exceptions.\n2. Underlying issues with how rrule performs validation. There are several issues open on github describing how an RRULE can be created excluding ALL dates from execution and making their computation take too long.\n\n# Installation\n\nYou can install django-celery-beat-rrule either via the Python Package Index (PyPI)\nor from source.\n\nTo install using `pip`:\n\n```bash\n $ pip install --upgrade django-celery-beat-rrule\n```\n\n## Configuration\n\nAdd django_celery_beat_rrule to the list of installed apps\n\n```python\nINSTALLED_APPS = [\n ...,\n 'django_celery_beat_rrule',\n]\n```\n\nRun django-celery-beat-rrule migrations\n\n```bash\n # make sure you have already installed django-celery-beat's migrations before you run this\n $ python manage.py migrate django_celery_beat_rrule\n```\n\nIf you change the Django `TIME_ZONE` setting your periodic task schedule\nwill still be based on the old timezone.\n\nTo fix that you would have to reset the \"last run time\" for each periodic task.\n",
"bugtrack_url": null,
"license": "The BSD 3-Clause License The following is a BSD 3-Clause (\"BSD New\" or \"BSD Simplified\") license template. To generate your own license, change the values of OWNER, ORGANIZATION and YEAR from their original values as given here, and substitute your own.\n \n Note: You may omit clause 3 and still be OSD-conformant. Despite its colloquial name \"BSD New\", this is not the newest version of the BSD license; it was followed by the even newer BSD-2-Clause version, sometimes known as the \"Simplified BSD License\". On January 9th, 2008 the OSI Board approved BSD-2-Clause, which is used by FreeBSD and others. It omits the final \"no-endorsement\" clause and is thus roughly equivalent to the MIT License.\n \n Historical Background: The original license used on BSD Unix had four clauses. The advertising clause (the third of four clauses) required you to acknowledge use of U.C. Berkeley code in your advertising of any product using that code. It was officially rescinded by the Director of the Office of Technology Licensing of the University of California on July 22nd, 1999. He states that clause 3 is \"hereby deleted in its entirety.\" The four clause license has not been approved by OSI. The license below does not contain the advertising clause.\n \n This prelude is not part of the license.\n \n OWNER = Regents of the University of California\n \n ORGANIZATION = University of California, Berkeley\n \n YEAR = 1998\n \n In the original BSD license, both occurrences of the phrase \"COPYRIGHT HOLDERS AND CONTRIBUTORS\" in the disclaimer read \"REGENTS AND CONTRIBUTORS\".\n \n License template\n Copyright (c) $YEAR $OWNER, All rights reserved.\n \n Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n \n Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"summary": "Add a RruleDatabaseScheduler, automatically execute tasks based on custom rrule schedules",
"version": "0.0.3",
"project_urls": {
"Homepage": "https://github.com/Wattabak/django-celery-beat-rrule"
},
"split_keywords": [
"django-celery-beat",
" rrule",
" dateutil"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "84e4e937088d84aa273d3356b99d0777054078795d90fa70315adfd0e9d6024f",
"md5": "8005dbe844c31d99f8ca2ea206ab3a84",
"sha256": "5fa370bd4a51dc1cdd8abb87051b1ce36a074daaac1fc1255b2cd574c016bab9"
},
"downloads": -1,
"filename": "django_celery_beat_rrule-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8005dbe844c31d99f8ca2ea206ab3a84",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 11942,
"upload_time": "2025-01-26T12:18:58",
"upload_time_iso_8601": "2025-01-26T12:18:58.945898Z",
"url": "https://files.pythonhosted.org/packages/84/e4/e937088d84aa273d3356b99d0777054078795d90fa70315adfd0e9d6024f/django_celery_beat_rrule-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b495eec4c9aa82e19dbe0167bc8f38a8d6b197ae839b56f2a988de276d3a4c3b",
"md5": "ead813b603cbe2ecb370592fd1d4fe82",
"sha256": "b1754b0e4f12c16d6dd1b39d1fd6b4220868add8408d5168640a90ab1d9bb268"
},
"downloads": -1,
"filename": "django_celery_beat_rrule-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "ead813b603cbe2ecb370592fd1d4fe82",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 17364,
"upload_time": "2025-01-26T12:19:01",
"upload_time_iso_8601": "2025-01-26T12:19:01.152890Z",
"url": "https://files.pythonhosted.org/packages/b4/95/eec4c9aa82e19dbe0167bc8f38a8d6b197ae839b56f2a988de276d3a4c3b/django_celery_beat_rrule-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-26 12:19:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Wattabak",
"github_project": "django-celery-beat-rrule",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-celery-beat-rrule"
}