{ "info": { "author": "Asif Saif Uddin, Ask Solem", "author_email": "auvipy@gmai.com, ask@celeryproject.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Framework :: Django :: 2.2", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Communications", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Distributed Computing" ], "description": "=====================================================================\n Database-backed Periodic Tasks\n=====================================================================\n\n|build-status| |coverage| |license| |wheel| |pyversion| |pyimp|\n\n:Version: 1.4.0\n:Web: http://django-celery-beat.readthedocs.io/\n:Download: http://pypi.python.org/pypi/django-celery-beat\n:Source: http://github.com/celery/django-celery-beat\n:Keywords: django, celery, beat, periodic task, cron, scheduling\n\nAbout\n=====\n\nThis extension enables you to store the periodic task schedule in the\ndatabase.\n\nThe periodic tasks can be managed from the Django Admin interface, where you\ncan create, edit and delete periodic tasks and how often they should run.\n\nUsing the Extension\n===================\n\nUsage and installation instructions for this extension are available\nfrom the `Celery documentation`_:\n\nhttp://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#using-custom-scheduler-classes\n\n\n.. _`Celery documentation`:\n http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#using-custom-scheduler-classes\n\nImportant Warning about Time Zones\n==================================\n\n.. warning::\n\n If you change the Django ``TIME_ZONE`` setting your periodic task schedule\n will still be based on the old timezone.\n\n To fix that you would have to reset the \"last run time\" for each periodic\n task::\n\n >>> from django_celery_beat.models import PeriodicTask, PeriodicTasks\n >>> PeriodicTask.objects.all().update(last_run_at=None)\n >>> for task in PeriodicTask.objects.all():\n >>> PeriodicTasks.changed(task)\n\n Note that this will reset the state as if the periodic tasks have never run\n before.\n\nModels\n======\n\n- ``django_celery_beat.models.PeriodicTask``\n\nThis model defines a single periodic task to be run.\n\nIt must be associated with a schedule, which defines how often the task should\nrun.\n\n- ``django_celery_beat.models.IntervalSchedule``\n\nA schedule that runs at a specific interval (e.g. every 5 seconds).\n\n- ``django_celery_beat.models.CrontabSchedule``\n\nA schedule with fields like entries in cron:\n``minute hour day-of-week day_of_month month_of_year``.\n\n- ``django_celery_beat.models.PeriodicTasks``\n\nThis model is only used as an index to keep track of when the schedule has\nchanged.\n\nWhenever you update a ``PeriodicTask`` a counter in this table is also\nincremented, which tells the ``celery beat`` service to reload the schedule\nfrom the database.\n\nIf you update periodic tasks in bulk, you will need to update the counter\nmanually::\n\n >>> from django_celery_beat.models import PeriodicTasks\n >>> PeriodicTasks.changed()\n\nExample creating interval-based periodic task\n---------------------------------------------\n\nTo create a periodic task executing at an interval you must first\ncreate the interval object::\n\n >>> from django_celery_beat.models import PeriodicTask, IntervalSchedule\n\n # executes every 10 seconds.\n >>> schedule, created = IntervalSchedule.objects.get_or_create(\n ... every=10,\n ... period=IntervalSchedule.SECONDS,\n ... )\n\nThat's all the fields you need: a period type and the frequency.\n\nYou can choose between a specific set of periods:\n\n\n- ``IntervalSchedule.DAYS``\n- ``IntervalSchedule.HOURS``\n- ``IntervalSchedule.MINUTES``\n- ``IntervalSchedule.SECONDS``\n- ``IntervalSchedule.MICROSECONDS``\n\n.. note::\n\n If you have multiple periodic tasks executing every 10 seconds,\n then they should all point to the same schedule object.\n\nThere's also a \"choices tuple\" available should you need to present this\nto the user::\n\n >>> IntervalSchedule.PERIOD_CHOICES\n\n\nNow that we have defined the schedule object, we can create the periodic task\nentry::\n\n >>> PeriodicTask.objects.create(\n ... interval=schedule, # we created this above.\n ... name='Importing contacts', # simply describes this periodic task.\n ... task='proj.tasks.import_contacts', # name of task.\n ... )\n\n\nNote that this is a very basic example, you can also specify the arguments\nand keyword arguments used to execute the task, the ``queue`` to send it\nto[*], and set an expiry time.\n\nHere's an example specifying the arguments, note how JSON serialization is\nrequired::\n\n >>> import json\n >>> from datetime import datetime, timedelta\n\n >>> PeriodicTask.objects.create(\n ... interval=schedule, # we created this above.\n ... name='Importing contacts', # simply describes this periodic task.\n ... task='proj.tasks.import_contacts', # name of task.\n ... args=json.dumps(['arg1', 'arg2']),\n ... kwargs=json.dumps({\n ... 'be_careful': True,\n ... }),\n ... expires=datetime.utcnow() + timedelta(seconds=30)\n ... )\n\n\n.. [*] you can also use low-level AMQP routing using the ``exchange`` and\n ``routing_key`` fields.\n\nExample creating crontab-based periodic task\n--------------------------------------------\n\nA crontab schedule has the fields: ``minute``, ``hour``, ``day_of_week``,\n``day_of_month`` and ``month_of_year`, so if you want the equivalent\nof a ``30 * * * *`` (execute every 30 minutes) crontab entry you specify::\n\n >>> from django_celery_beat.models import CrontabSchedule, PeriodicTask\n >>> schedule, _ = CrontabSchedule.objects.get_or_create(\n ... minute='30',\n ... hour='*',\n ... day_of_week='*',\n ... day_of_month='*',\n ... month_of_year='*',\n ... timezone=pytz.timezone('Canada/Pacific')\n ... )\n\nThe crontab schedule is linked to a specific timezone using the 'timezone' input parameter.\n\nThen to create a periodic task using this schedule, use the same approach as\nthe interval-based periodic task earlier in this document, but instead\nof ``interval=schedule``, specify ``crontab=schedule``::\n\n >>> PeriodicTask.objects.create(\n ... crontab=schedule,\n ... name='Importing contacts',\n ... task='proj.tasks.import_contacts',\n ... )\n\nTemporarily disable a periodic task\n-----------------------------------\n\nYou can use the ``enabled`` flag to temporarily disable a periodic task::\n\n >>> periodic_task.enabled = False\n >>> periodic_task.save()\n\n\nExample running periodic tasks\n-----------------------------------\n\nThe periodic tasks still need 'workers' to execute them.\nSo make sure the default **Celery** package is installed.\n(If not installed, please follow the installation instructions\nhere: https://github.com/celery/celery)\n\nBoth the worker and beat services need to be running at the same time.\n\n1. Start a Celery worker service (specify your Django project name)::\n\n\n $ celery -A [project-name] worker --loglevel=info\n\n\n2. As a separate process, start the beat service (specify the Django scheduler)::\n\n\n $ celery -A [project-name] beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler\n\n\n **OR** you can use the -S (scheduler flag), for more options see ``celery beat --help``)::\n\n $ celery -A [project-name] beat -l info -S django\n\n Also, as an alternative, you can run the two steps above (worker and beat services)\n with only one command (recommended for **development environment only**)::\n\n\n $ celery -A [project-name] worker --beat --scheduler django --loglevel=info\n\n\n3. Now you can add and manage your periodic tasks from the Django Admin interface.\n\n\n\n\nInstallation\n============\n\nYou can install django-celery-beat either via the Python Package Index (PyPI)\nor from source.\n\nTo install using `pip`,::\n\n $ pip install -U django-celery-beat\n\nDownloading and installing from source\n--------------------------------------\n\nDownload the latest version of django-celery-beat from\nhttp://pypi.python.org/pypi/django-celery-beat\n\nYou can install it by doing the following,::\n\n $ tar xvfz django-celery-beat-0.0.0.tar.gz\n $ cd django-celery-beat-0.0.0\n $ python setup.py build\n # python setup.py install\n\nThe last command must be executed as a privileged user if\nyou are not currently using a virtualenv.\n\nUsing the development version\n-----------------------------\n\nWith pip\n~~~~~~~~\n\nYou can install the latest snapshot of django-celery-beat using the following\npip command::\n\n $ pip install https://github.com/celery/django-celery-beat/zipball/master#egg=django-celery-beat\n\n\nTZ Awareness:\n-------------\n\nIf you have a project that is time zone naive, you can set `DJANGO_CELERY_BEAT_TZ_AWARE=False` in your settings file.\n\n\n.. |build-status| image:: https://secure.travis-ci.org/celery/django-celery-beat.svg?branch=master\n :alt: Build status\n :target: https://travis-ci.org/celery/django-celery-beat\n\n.. |coverage| image:: https://codecov.io/github/celery/django-celery-beat/coverage.svg?branch=master\n :target: https://codecov.io/github/celery/django-celery-beat?branch=master\n\n.. |license| image:: https://img.shields.io/pypi/l/django-celery-beat.svg\n :alt: BSD License\n :target: https://opensource.org/licenses/BSD-3-Clause\n\n.. |wheel| image:: https://img.shields.io/pypi/wheel/django-celery-beat.svg\n :alt: django-celery-beat can be installed via wheel\n :target: http://pypi.python.org/pypi/django-celery-beat/\n\n.. |pyversion| image:: https://img.shields.io/pypi/pyversions/django-celery-beat.svg\n :alt: Supported Python versions.\n :target: http://pypi.python.org/pypi/django-celery-beat/\n\n.. |pyimp| image:: https://img.shields.io/pypi/implementation/django-celery-beat.svg\n :alt: Support Python implementations.\n :target: http://pypi.python.org/pypi/django-celery-beat/\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/celery/django-celery-beat", "keywords": "django celery beat periodic task database", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-celery-beat", "package_url": "https://pypi.org/project/django-celery-beat/", "platform": "any", "project_url": "https://pypi.org/project/django-celery-beat/", "project_urls": { "Homepage": "https://github.com/celery/django-celery-beat" }, "release_url": "https://pypi.org/project/django-celery-beat/1.5.0/", "requires_dist": [ "django-timezone-field (>=2.0)", "python-crontab (>=2.3.4)" ], "requires_python": "", "summary": "Database-backed Periodic Tasks.", "version": "1.5.0" }, "last_serial": 5303562, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "3a626cb1114fc651057f11290c8fd58f", "sha256": "a7c800357edceb5342ec79a8b882217668683dcec6e95adc8c4674001e301595" }, "downloads": -1, "filename": "django_celery_beat-1.0.0.tar.gz", "has_sig": true, "md5_digest": "3a626cb1114fc651057f11290c8fd58f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 726195, "upload_time": "2016-09-08T22:19:14", "url": "https://files.pythonhosted.org/packages/16/ed/8a85094ac868fe1edbd8d761c07c1ed342d562823a300956b67be070dec5/django_celery_beat-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "81205be1699d07e37e3d7027833eb307", "sha256": "6d132af1e24c313eb47042da71cf30c5f612f93337a1c85309ad2d490f76bf8b" }, "downloads": -1, "filename": "django_celery_beat-1.0.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "81205be1699d07e37e3d7027833eb307", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 19026, "upload_time": "2016-11-07T23:18:27", "url": "https://files.pythonhosted.org/packages/dc/4b/9a4a8b59d8bce0d6efd5e8733429b5604085a27536cd9061ddf3d65d69e2/django_celery_beat-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae264d14db0375ff86a1d6d172aeb6c6", "sha256": "c8d5233fd0eb3404a800cc62383d241ac6f95b04d3a87b3720d212f0c85654b9" }, "downloads": -1, "filename": "django_celery_beat-1.0.1.tar.gz", "has_sig": true, "md5_digest": "ae264d14db0375ff86a1d6d172aeb6c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 63281, "upload_time": "2016-11-07T23:18:24", "url": "https://files.pythonhosted.org/packages/f3/80/11489d116003d11dd32974f3122fc0e2d8b2b2829b37ffecacae1c2f0edf/django_celery_beat-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "f6e59eee8e00ba7e37858c98f8b94ae5", "sha256": "b5fa8f956ca9a0aa2bf81dcfb246542620b8b17a2a61b6c77e43a2cac5252826" }, "downloads": -1, "filename": "django_celery_beat-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f6e59eee8e00ba7e37858c98f8b94ae5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22123, "upload_time": "2017-10-30T12:29:08", "url": "https://files.pythonhosted.org/packages/e3/51/17e63d0881d0c6ee81d80394120e1296f580941d51fde20b9a2774f80075/django_celery_beat-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "adb9dabbf59a6cdbf9e54c127afe9a8b", "sha256": "2371f6d23b63a09aff8dbd294665becd0f3bfa1e05e59bb6fbe2fee3abbdfa9d" }, "downloads": -1, "filename": "django-celery-beat-1.1.0.tar.gz", "has_sig": false, "md5_digest": "adb9dabbf59a6cdbf9e54c127afe9a8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 63312, "upload_time": "2017-10-30T12:29:10", "url": "https://files.pythonhosted.org/packages/96/51/4dd76755be22ccac3ceba2e66ec969ef76a7d4825d7fa9f5d46e468f85e5/django-celery-beat-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "781fcf76c1fc9376428a81e5f20128f2", "sha256": "1f770a936f070fd6b2ceac123ef4951fbe9e941e39b52ae9eea5ac0efe57d51d" }, "downloads": -1, "filename": "django_celery_beat-1.1.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "781fcf76c1fc9376428a81e5f20128f2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23686, "upload_time": "2018-02-18T12:39:30", "url": "https://files.pythonhosted.org/packages/45/4b/4d9dfd63ebd119e7340526d023248896626e9454edba981b331858b1b5bf/django_celery_beat-1.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2503c26b2cf33d330c11671c76ede222", "sha256": "d40e2c48aeed7043fff6064f53bc157f6a1f55b45d984eb2b52bf1b88ae96026" }, "downloads": -1, "filename": "django-celery-beat-1.1.1.tar.gz", "has_sig": true, "md5_digest": "2503c26b2cf33d330c11671c76ede222", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 65600, "upload_time": "2018-02-18T12:39:32", "url": "https://files.pythonhosted.org/packages/34/0f/f73273e993f347712d6796df3259e3efb0939ef7bb7cb95ba2a060f3ced4/django-celery-beat-1.1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "0da5cb6b8df1a0ac9796208f04f6e6ab", "sha256": "b25bc19a589e2851361408708a2aac43524608dd35b85d34a295f90f873a75e5" }, "downloads": -1, "filename": "django_celery_beat-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0da5cb6b8df1a0ac9796208f04f6e6ab", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27585, "upload_time": "2018-10-08T12:17:12", "url": "https://files.pythonhosted.org/packages/3e/00/8246c53179c6afbcdfdd18aedfc4584ffc30cb89d445d542accb8d461835/django_celery_beat-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4dd9cd02b76fdc02535cc20925241ee", "sha256": "f3be14a02280d9977757acfcc8464d0bb5a24c3ed5fbd88b60ca63bb24fce632" }, "downloads": -1, "filename": "django-celery-beat-1.2.0.tar.gz", "has_sig": false, "md5_digest": "e4dd9cd02b76fdc02535cc20925241ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 71733, "upload_time": "2018-10-08T12:17:14", "url": "https://files.pythonhosted.org/packages/94/9a/ba87101a1e71b2750a40ba1898bf8d7595c3ff7a04c6c16faccbcd30cc1d/django-celery-beat-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "03a166c8edf9901cc49a98a5f1a48a0c", "sha256": "81cdf4b2dfe64433ec2527ce654bc4bf3e3a3410690163205f6afcd3697e4158" }, "downloads": -1, "filename": "django_celery_beat-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "03a166c8edf9901cc49a98a5f1a48a0c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30289, "upload_time": "2018-11-12T15:20:58", "url": "https://files.pythonhosted.org/packages/d5/6c/e892f8dd2d435321c2ca54c264ff8278d42c1ebfac99e37516c225ae0ceb/django_celery_beat-1.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9188353eae1a9c00e9320037fb2e89b", "sha256": "800b67d396b12c59ca40b50a10c3ace58ca5907879237cad4e0cd404e779aa39" }, "downloads": -1, "filename": "django-celery-beat-1.3.0.tar.gz", "has_sig": false, "md5_digest": "e9188353eae1a9c00e9320037fb2e89b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 73087, "upload_time": "2018-11-12T15:21:00", "url": "https://files.pythonhosted.org/packages/d6/8e/1c60693499a95649b8796785ef61dcd996d53758ad24d69d2da792f4a878/django-celery-beat-1.3.0.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "a145a9292eb2fcab66e73a46ba88317c", "sha256": "3c2c22647455be5503aca7450db64ea53acacee2d0aef3d7ac49aa3ef3845724" }, "downloads": -1, "filename": "django_celery_beat-1.4.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "a145a9292eb2fcab66e73a46ba88317c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30553, "upload_time": "2018-12-09T11:18:25", "url": "https://files.pythonhosted.org/packages/3f/83/5f58d45449ba3d82e5e691c712f1133f3b9d3f01105bed8292e85cba56e0/django_celery_beat-1.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01aacde0faf7663eb904066d10f072a1", "sha256": "bfc22dad2884524697e1fcdfa63c0555a65151a97902c3045cd2cf7bf63970e4" }, "downloads": -1, "filename": "django-celery-beat-1.4.0.tar.gz", "has_sig": true, "md5_digest": "01aacde0faf7663eb904066d10f072a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 73474, "upload_time": "2018-12-09T11:18:28", "url": "https://files.pythonhosted.org/packages/97/36/ac4eafe46f7264d2561ad84acca3134b0c181dd1c073364c9bcf69c2e1e6/django-celery-beat-1.4.0.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "6b85cdae62e9163864314b2e9d9dd853", "sha256": "61c92d4b600a9f24406ee0b8d01a9b192253e15d047e3325e1d81e2cacf7aba6" }, "downloads": -1, "filename": "django_celery_beat-1.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6b85cdae62e9163864314b2e9d9dd853", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 36415, "upload_time": "2019-05-22T16:47:31", "url": "https://files.pythonhosted.org/packages/88/13/2dbab42ea826efab897d8638304d499078e0093e73c9b5fa19259e48ea94/django_celery_beat-1.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f932401a4683c4e44cfd4872b1a824d7", "sha256": "659b39232c454ac27022bf679939bce0471fd482f3ee9276f5199716cb4afad9" }, "downloads": -1, "filename": "django-celery-beat-1.5.0.tar.gz", "has_sig": false, "md5_digest": "f932401a4683c4e44cfd4872b1a824d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 79761, "upload_time": "2019-05-22T16:47:35", "url": "https://files.pythonhosted.org/packages/ca/e3/e80420a5d6abcc7437d4f549a3d1c6f79a0d4861318d75c69bb4cf8477e3/django-celery-beat-1.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6b85cdae62e9163864314b2e9d9dd853", "sha256": "61c92d4b600a9f24406ee0b8d01a9b192253e15d047e3325e1d81e2cacf7aba6" }, "downloads": -1, "filename": "django_celery_beat-1.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6b85cdae62e9163864314b2e9d9dd853", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 36415, "upload_time": "2019-05-22T16:47:31", "url": "https://files.pythonhosted.org/packages/88/13/2dbab42ea826efab897d8638304d499078e0093e73c9b5fa19259e48ea94/django_celery_beat-1.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f932401a4683c4e44cfd4872b1a824d7", "sha256": "659b39232c454ac27022bf679939bce0471fd482f3ee9276f5199716cb4afad9" }, "downloads": -1, "filename": "django-celery-beat-1.5.0.tar.gz", "has_sig": false, "md5_digest": "f932401a4683c4e44cfd4872b1a824d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 79761, "upload_time": "2019-05-22T16:47:35", "url": "https://files.pythonhosted.org/packages/ca/e3/e80420a5d6abcc7437d4f549a3d1c6f79a0d4861318d75c69bb4cf8477e3/django-celery-beat-1.5.0.tar.gz" } ] }