{ "info": { "author": "Lars Kreisz", "author_email": "lars.kreisz@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: System :: Installation/Setup" ], "description": ".. image:: https://img.shields.io/travis/kraiz/django-crontab/master.svg\n :target: https://travis-ci.org/kraiz/django-crontab\n.. image:: https://img.shields.io/coveralls/kraiz/django-crontab/master.svg\n :target: https://coveralls.io/r/kraiz/django-crontab\n.. image:: https://img.shields.io/pypi/dw/django-crontab.svg\n :target: https://pypi.python.org/pypi/django-crontab\n.. image:: https://img.shields.io/pypi/v/django-crontab.svg\n :target: https://pypi.python.org/pypi/django-crontab\n.. image:: https://img.shields.io/pypi/pyversions/django-crontab.svg\n :target: https://pypi.python.org/pypi/django-crontab\n.. image:: https://img.shields.io/pypi/l/django-crontab.svg\n :target: https://pypi.python.org/pypi/django-crontab\n\nabout\n=====\n\ndead simple crontab powered job scheduling for django (1.8+).\n\nsetup\n=====\ninstall via pip::\n\n pip install django-crontab\n\nadd it to installed apps in django settings.py::\n\n INSTALLED_APPS = (\n 'django_crontab',\n ...\n )\n\nnow create a new method that should be executed by cron every 5 minutes, f.e. in `myapp/cron.py`::\n\n def my_scheduled_job():\n pass\n\nnow add this to your settings.py::\n\n CRONJOBS = [\n ('*/5 * * * *', 'myapp.cron.my_scheduled_job')\n ]\n\nyou can also define positional and keyword arguments which let you call django management commands::\n\n CRONJOBS = [\n ('*/5 * * * *', 'myapp.cron.other_scheduled_job', ['arg1', 'arg2'], {'verbose': 0}),\n ('0 4 * * *', 'django.core.management.call_command', ['clearsessions']),\n ]\n\nfinally run this command to add all defined jobs from `CRONJOBS` to crontab (of the user which you are running this command with)::\n\n python manage.py crontab add\n\nshow current active jobs of this project::\n\n python manage.py crontab show\n\nremoving all defined jobs is straight forward::\n\n python manage.py crontab remove\n\nconfig\n======\nthere are a bunch of setting vars to customize behavior. each of this comes with default values that should properly fit. if not, feel free to overwrite.\n\nCRONJOBS\n - list of jobs, each defined as tuple:\n\n - format 1:\n\n 1. required: cron timing (in usual format: http://en.wikipedia.org/wiki/Cron#Format)\n 2. required: the python module path to the method\n 3. optional: a job specific suffix (f.e. to redirect out/err to a file, default: '')\n\n - format 2:\n\n 1. required: cron timing (in usual format: http://en.wikipedia.org/wiki/Cron#Format)\n 2. required: the python module path to the method\n 3. optional: list of positional arguments for the method (default: [])\n 4. optional: dict of keyword arguments for the method (default: {})\n 5. optional: a job specific suffix (f.e. to redirect out/err to a file, default: '')\n\n - NOTE: Run \"python manage.py crontab add\" each time you change CRONJOBS in any way!\n - default: []\n - example::\n\n CRONJOBS = [\n ('*/5 * * * *', 'myapp.cron.my_scheduled_job'),\n\n # format 1\n ('0 0 1 * *', 'myapp.cron.my_scheduled_job', '>> /tmp/scheduled_job.log'),\n\n # format 2\n ('0 0 1 * *', 'myapp.cron.other_scheduled_job', ['myapp']),\n ('0 0 * * 0', 'django.core.management.call_command', ['dumpdata', 'auth'], {'indent': 4}, '> /home/john/backups/last_sunday_auth_backup.json'),\n ]\n\nCRONTAB_LOCK_JOBS\n - prevent starting a job if an old instance of the same job is still running\n - default: False\n - since 0.5.0\n\nCRONTAB_EXECUTABLE\n - path to the crontab executable of your os\n - default: '/usr/bin/crontab'\n\nCRONTAB_DJANGO_PROJECT_NAME\n - the name of your django project, used to build path path to manage.py and to mark the jobs in contrab via comment for later removing\n - default is read from DJANGO_SETTINGS_MODULE environment variable\n\nCRONTAB_DJANGO_MANAGE_PATH\n - path to manage.py file (including the manage.py itself, i.e. '/home/john/web/manage.py')\n - default is build using DJANGO_PROJECT_NAME\n\nCRONTAB_DJANGO_SETTINGS_MODULE\n - dotted python path to the settings module to run the command with\n - default is the common one from the environment variable and will not be overwritten\n - since 0.6.0\n\nCRONTAB_PYTHON_EXECUTABLE\n - path to the python interpreter executable used to run the scheduled job\n - default uses the interpreter executable used to `add` the jobs (via 'python manage.py crontab add')\n\nCRONTAB_COMMAND_PREFIX\n - something you wanne do or declare before each job gets executed. A good point for environment variables.\n - default: '' (empty string)\n - example: 'STAGE=production'\n\nCRONTAB_COMMAND_SUFFIX\n - something you wanne do after each job was executed.\n - default: '' (empty string)\n - example: '2>&1'\n\nCRONTAB_COMMENT\n - used for marking the added contab-lines for removing, default value includes project name to distinguish multiple projects on the same host and user\n - default: 'django-crontabs for ' + CRONTAB_DJANGO_PROJECT_NAME\n\ncontributors\n============\narski cinghiale meric426 justdoit0823 chamaken\n\nfaq\n===\n* **I'm using this old django version (<1.8) and can't install this package. What should i do?**\n - Yeah, update django of course (!) or - as you seem to be familiar with old, unsupported versions, install the old version of this package too (it support django 1.3-1.7)::\n\n pip install django-crontab==0.6.0\n\n* **Will it work with windows?**\n - No.\n* **I'm getting \"bad command\"/\"errors in cronfile\" while installing via \"crontab add\". What's wrong?**\n - Maybe it's your cron time format, it can have 5 or 6 fields. Check that your system supports 6 or just define 5 in `CRONJOBS`. (see #23)\n\nlicense\n=======\nMIT-License, see LICENSE file.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kraiz/django-crontab", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-crontab", "package_url": "https://pypi.org/project/django-crontab/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-crontab/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kraiz/django-crontab" }, "release_url": "https://pypi.org/project/django-crontab/0.7.1/", "requires_dist": null, "requires_python": null, "summary": "dead simple crontab powered job scheduling for django", "version": "0.7.1" }, "last_serial": 1994168, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5b10611b1b1979e0467edbc7e12ec9fe", "sha256": "2516aa3243f78bed0d24d3620b6724dc7308073d8305bf90550e103d19a722ec" }, "downloads": -1, "filename": "django-crontab-0.1.tar.gz", "has_sig": false, "md5_digest": "5b10611b1b1979e0467edbc7e12ec9fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2612, "upload_time": "2011-07-24T22:33:22", "url": "https://files.pythonhosted.org/packages/c1/15/bc71fc3712b3f84903bc00f7f92c6e703bc5abaab0afe05b3e892fccafcf/django-crontab-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "0f7c83014e14c50507fabde4a4fe940c", "sha256": "e6b7007d7aeb307736be9e9664298908454f19da5c5adae2aa6268a3c0e3eb19" }, "downloads": -1, "filename": "django-crontab-0.2.tar.gz", "has_sig": false, "md5_digest": "0f7c83014e14c50507fabde4a4fe940c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2619, "upload_time": "2011-07-25T01:35:31", "url": "https://files.pythonhosted.org/packages/d6/5e/78bdebea83fd50128ac4f2fc99d40fa653cd606e1caffe819cd19781faab/django-crontab-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "9f4df4735c9b61e3e9ecc2502c3850e9", "sha256": "ceef82b5c99533bb53841c8605871819bd3541ce764b33be50f12c07a704b3ed" }, "downloads": -1, "filename": "django-crontab-0.3.tar.gz", "has_sig": false, "md5_digest": "9f4df4735c9b61e3e9ecc2502c3850e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2650, "upload_time": "2011-08-05T11:06:57", "url": "https://files.pythonhosted.org/packages/7d/26/98f42f7bf365d5d526a8e7af69d0fb83fb37722192dfe3929c99883430b8/django-crontab-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "bb06ed91e4df55b93cfa02fcaacb0da9", "sha256": "73b74cab77be5be5f617152ede2b62bbb4eeedfe0ce44717c873ba20f92a7eb2" }, "downloads": -1, "filename": "django-crontab-0.4.tar.gz", "has_sig": true, "md5_digest": "bb06ed91e4df55b93cfa02fcaacb0da9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2836, "upload_time": "2012-07-29T21:08:02", "url": "https://files.pythonhosted.org/packages/67/32/e77375bbee8336e8ddfe7224a436914dffe39ab60631a05c7fe1d02937ae/django-crontab-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "4c198b2515ce7981daaa9dd7f5275ed9", "sha256": "7536e305ce88d3ed2031677e92175d1cd8cf0000ec23a7da3149d6ff53351f1b" }, "downloads": -1, "filename": "django-crontab-0.4.1.tar.gz", "has_sig": false, "md5_digest": "4c198b2515ce7981daaa9dd7f5275ed9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3970, "upload_time": "2013-02-13T20:17:52", "url": "https://files.pythonhosted.org/packages/18/6a/545002f8e1166d66fd213c875a3025f7b83929126bf8cb067bf97a3906f9/django-crontab-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "73614095eaea4cc3d42ea83dfbb63d64", "sha256": "5ab39482b09bec343af72c1e93511bc0b30eb29e61ee4001bd09536c711ec06b" }, "downloads": -1, "filename": "django-crontab-0.4.2.tar.gz", "has_sig": false, "md5_digest": "73614095eaea4cc3d42ea83dfbb63d64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4202, "upload_time": "2013-02-14T16:44:50", "url": "https://files.pythonhosted.org/packages/15/6d/15efbd5390928f15b3ca49978940c70ee58d1de6cca7676628c8dd58902c/django-crontab-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "6548a88a5934b182c4152c4f15619417", "sha256": "c4ddc9940db23a0c5bacac6587b06b501cd74a903711cc0b2515c173dd9ec24a" }, "downloads": -1, "filename": "django-crontab-0.4.3.tar.gz", "has_sig": false, "md5_digest": "6548a88a5934b182c4152c4f15619417", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4225, "upload_time": "2013-02-18T16:58:40", "url": "https://files.pythonhosted.org/packages/99/f9/5fbb0252528ca166878c435efdc961c61a719da6f0bd4f235382caf6bae4/django-crontab-0.4.3.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "53f927e283bfb4b985ac0c8ad0d428f9", "sha256": "82e2c4134f01f6ab7fd4c3b87e5bebfeab55d059917b45fa3c3601b27ed865de" }, "downloads": -1, "filename": "django-crontab-0.5.0.tar.gz", "has_sig": false, "md5_digest": "53f927e283bfb4b985ac0c8ad0d428f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5036, "upload_time": "2013-04-26T20:23:24", "url": "https://files.pythonhosted.org/packages/0c/14/635a84bb8f2ff1b71abfdb80b49356395f358eaa98253ff33924a2357267/django-crontab-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "c4b4388453d6ea30030c01278d7128d3", "sha256": "601897d59d902f4f4458dde72dcfbade582cf015f522a1eae0c0217452eef045" }, "downloads": -1, "filename": "django-crontab-0.5.1.tar.gz", "has_sig": false, "md5_digest": "c4b4388453d6ea30030c01278d7128d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5267, "upload_time": "2013-04-29T15:30:01", "url": "https://files.pythonhosted.org/packages/25/9d/438be3b4ea98fcc8d9722165c2a4706694cacf0cbb3845ccddb68dd5f6ba/django-crontab-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "b0b1c55b4b5507f726e779501f7b8a38", "sha256": "484a51220a0725b0de897afbaf9c5cb5693672689bc4cca5b96337b458e75a2b" }, "downloads": -1, "filename": "django_crontab-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b0b1c55b4b5507f726e779501f7b8a38", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 10191, "upload_time": "2014-12-07T14:39:23", "url": "https://files.pythonhosted.org/packages/68/0b/602eca657c277aac5ecc0249147f57a11bdb37b4489e6fb198f490821625/django_crontab-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49cbed75c9f20ab32fa785d13cf93323", "sha256": "7d359644931162d92cc7461ef87336d61772df92b8ba9e5d008f72a5f19ffb47" }, "downloads": -1, "filename": "django-crontab-0.6.0.tar.gz", "has_sig": false, "md5_digest": "49cbed75c9f20ab32fa785d13cf93323", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6083, "upload_time": "2014-12-07T14:39:20", "url": "https://files.pythonhosted.org/packages/66/9c/658aec3160dd110141d4a3a0614876ee41641c6db525698125bf7a6c862e/django-crontab-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "6b852b5069f110c973581d5979ab9705", "sha256": "44e87692caea56bd0b77e83a0c2b8efd5a34f768a898acf73e2eb8386ed19478" }, "downloads": -1, "filename": "django_crontab-0.7.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6b852b5069f110c973581d5979ab9705", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 10804, "upload_time": "2015-12-02T17:38:56", "url": "https://files.pythonhosted.org/packages/5d/c7/ad9b1f3d84a21c6cfed8dac875d60f87a3b957350271fd583516b70b7b00/django_crontab-0.7.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ce03b32d60b7b7c76c7bc56b688377b9", "sha256": "5c598b250058972e37e6bb2ed7a5d684898d31577082178a8e069f9aac2ab6bc" }, "downloads": -1, "filename": "django-crontab-0.7.0.tar.gz", "has_sig": false, "md5_digest": "ce03b32d60b7b7c76c7bc56b688377b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7095, "upload_time": "2015-12-02T17:38:50", "url": "https://files.pythonhosted.org/packages/2c/4a/95219bdbcedb5d5b2c478573b37e381925de0beb2eb28d2c397c5d7f5368/django-crontab-0.7.0.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "bc9eefc87d907eb6c46e49a1c8fc7c0b", "sha256": "1201810a212460aaaa48eb6a766738740daf42c1a4f6aafecfb1525036929236" }, "downloads": -1, "filename": "django-crontab-0.7.1.tar.gz", "has_sig": false, "md5_digest": "bc9eefc87d907eb6c46e49a1c8fc7c0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7089, "upload_time": "2016-03-07T19:35:54", "url": "https://files.pythonhosted.org/packages/37/bd/a122ba96167f5dfab70a58ca22fa046b7ef1ebad9ff026f7831bd6c2a49c/django-crontab-0.7.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bc9eefc87d907eb6c46e49a1c8fc7c0b", "sha256": "1201810a212460aaaa48eb6a766738740daf42c1a4f6aafecfb1525036929236" }, "downloads": -1, "filename": "django-crontab-0.7.1.tar.gz", "has_sig": false, "md5_digest": "bc9eefc87d907eb6c46e49a1c8fc7c0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7089, "upload_time": "2016-03-07T19:35:54", "url": "https://files.pythonhosted.org/packages/37/bd/a122ba96167f5dfab70a58ca22fa046b7ef1ebad9ff026f7831bd6c2a49c/django-crontab-0.7.1.tar.gz" } ] }