{ "info": { "author": "David Kotlirevsky", "author_email": "david.kotlirevsky@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7" ], "description": "# CRONABLY\n\n## Introduction\n\nCronably allowsrun python scripts with configured repetitions easily.\nEvery executed task under a job will let a register into an internal memory sqllite db\n. With simple changes in the configuration ( into the code or using an external file) you can change \nthe way the cron interact with your code, including let the db as concrete db.\n\nLet me show you some features\n\n## About How it Running\nCronably can run just configuring using annotations like this:\n```\nfrom cronably import Cronably\n\n@Cronably(name=\"HOLA_MUNDO\")\ndef my_process():\n print \"Hola Mundo\"\n\n```\n\nOr using an external file, it should be named \"cronably.txt\" , it should be allocated in the same path as the process:\n\n```\nfrom cronably.implementation import Cronably\n\n\n@Cronably(ext_config=True)\ndef my_process_from_file():\n print \"Hola Mundo\"\n\n\nif __name__ == '__main__':\n my_process_from_file()\n```\n\nAnd file should contains this:\n\n```\nname=HOLA_MUNDO\n```\nIf you want to run from file, is mandatory to add always the param ext_config. If you add it all\nparameters will be taken from file. If you add here and also into the file, it will be overwritten by file's config values.\n\nWith this simple step you are telling to cronably that the method should run once. It's because \nthe default parameter loop, by default is 1. The field \"name\" is mandatory.\n\n## About Loops\nYou can tell to cronably the times you want to repeat, (like a loop), with nothing, it will run only once\nIf you configure: \n\n```\n@Cronably(name=\"HOLA_MUNDO\", loops = 10)\ndef my_process():\n print \"Hola Mundo\"\n\n```\nIt will run 10 times\n\nBut if you change it: \n\n```\n@Cronably(name=\"HOLA_MUNDO\", loops = -1)\ndef my_process():\n print \"Hola Mundo\"\n\n```\nIt will not stop running, until you kill the process\n\n### Loops and repetitions\n\nLoops live together with repetitions, it means you can repeat the process every lapse of time, but if you configure an amount of times to do it,\nit will stop once you accomplish the quantity you configure there. \n\n## About Repetitions\n\n### Concrete elapse of times\n\n#### Within the code:\n```\n@Cronably(name=\"HOLA_MUNDO\", loops=10, repetition_frame= VALUE, repetition_period=15)\ndef my_process():\n print \"Hola Mundo\"\n```\nrepetition_frame can be: \n* HOURS\n* MINUTES\n* SECONDS\n* DAYS\n\nit will run 10 times every 15 MINUTES, from the moment you start the script\n\n\n#### Within the file:\n```\nname=HOLA_MUNDO\nloops=10\nrepetition.frame=HOURS\nrepetition.period=2\n\n```\n\nit will run 10 times the process every 2 HOURS\n\nThe repetitions will start from the moment you run the script.\n\n\n### Every Day, several times in specific hours \n\nYou should put as frame the value: DAILY\n\n### Within the code:\n```\n@Cronably( \n name=\"HOLA_MUNDO\", \n loops=10, \n repetition_frame= DAILY, \n repetition_period='10:00,14:00,20:00' )\ndef my_process():\n print \"Hola Mundo\"\n```\n\nit will run 10 times every Day at 10:00, 14:00 and 20:00.\nAttention:\n* It must be ordered from minus to Minor \n* I'm using 0:00 to 23:59 style time. \n\n#### Within the file:\n```\nname=HOLA_MUNDO\nloops=10\nrepetition.frame=DAILY\nrepetition.period=10:00,14:00,20:00\n```\n\n\n### Specific Days \n\nYou should put as frame the value: WEEKLY\n\n### Within the code:\n```\n@Cronably(name=\"HOLA_MUNDO\", loops=10, repetition_frame= WEEKLY, repetition_period_day='Monday',repetition_period_time='10:00' )\ndef my_process():\n print \"Hola Mundo\"\n```\n\nIt will run 10 times the process every Monday at 10:00 (AM)\nAttention: I'm using 0:00 to 23:59 style time.\n\n#### Within the file:\n```\nname=HOLA_MUNDO\nloops=10\nrepetition.frame=WEEKLY\nrepetition.period.day=Monday\nrepetition.period.time=10:00\n```\n\nIt will run 10 times the process every Monday at 10:00 (AM)\n\nThe repetitions will start from the moment you run the script.\n\n\n### Specific Dates\n**TODO**\n\n## About Reporting\nwhen you setup reporting with Y ( default is N)\n\n```\nreport='Y'\n```\n\nIt will create, at the end of all loops some important information about your process, \nIf you add some \"print\" commands to your process, it will also print those outputs, for your analysis if it where necessary.\n\n\n## Example of generated report\n````\nJob\njob_id: 1\njob_name: A_JOB\nloops_setted: $job_loops\n-------------------------------------------\nParams\nname:A_JOB\ndb_kind::memory:\nrepetition.period:1\nrepetition.frame:seconds\nreport:Y\next_config:True\n-------------------------------------------\nTASKS\n-------------------------------------------\ntask: 1\nstart: 2018/11/26T08:25:15\nend: 2018/11/26T08:27:15\nstatus: 1\noutput:\nsome_report_0101\nsome_report_0102\nsome_report_0103\n-------------------------------------------\ntask: 2\nstart: 2018/11/26T08:27:15\nend: 2018/11/26T08:28:15\nstatus: 1\noutput:\nsome_report_0201\nsome_report_0202\nsome_report_0203\n-------------------------------------------\n````\n\n## About Internal configure internal db for register\n\nCronably use for configuration and let some register SQLlite DB . By default it's a memory db, but you can configure \nto let it as concrete SQLlite DB so you can ask later about the process runned and their status.\n\n### Within the code:\n```\n@Cronably(name=\"HOLA_MUNDO\", loops=10, db_kind='cronably', other configs... )\ndef my_process():\n print \"Hola Mundo\"\n```\n\nit will create a concrete sqllite into your folder script named cronably\n\n#### Within the file:\n```\nname=HOLA_MUNDO\nloops=10\ndb_kind=cronably\n...\n```\n\nIf you want to know how to access or read sqllite please read [sqlLite Documentation](https://www.sqlite.org/index.html)\n\n\n## Clone and install locally\n\n### Build from sources\n\nSteps once you clone it from https://gitlab.com/Kotlirevsky/cronably:\n\n1.- build : run _python setup.py sdist bdist_wheel_.\n\nIt will create the lib cronably.X.X.X.tar.gz in dist folder.\n\n2.- In your proyect , if you have pipenv run:\n\n_pipenv install cronably-1.0.0.tar.gz_\n\n3.- You can check this [example](https://github.com/davidgk/example_cronably/) running\n\n\n### From From Pypi\n\n\n2.- In your proyect , if you have pipenv run:\n\n_pip install cronably_\n\n3.- You can check this [example](https://github.com/davidgk/example_cronably/) running\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/Kotlirevsky/cronably", "keywords": "cronably,cron", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cronably", "package_url": "https://pypi.org/project/cronably/", "platform": "", "project_url": "https://pypi.org/project/cronably/", "project_urls": { "Homepage": "https://gitlab.com/Kotlirevsky/cronably" }, "release_url": "https://pypi.org/project/cronably/1.3.1/", "requires_dist": null, "requires_python": "", "summary": "Cronably allows you run python scripts with configured repetitions easily", "version": "1.3.1" }, "last_serial": 4582944, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e794160bc05f6aae0c053d122113777c", "sha256": "8b69d0d0e2e5fb96436fec7e1614aae3344f98d8c3a59f7ba8092f5f1efb7150" }, "downloads": -1, "filename": "cronably-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "e794160bc05f6aae0c053d122113777c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 14696, "upload_time": "2018-11-15T12:12:01", "url": "https://files.pythonhosted.org/packages/c2/45/778e2f3857e1d6dcbab03ec58e672640539fdb2b86dd20114f0cebbd83e8/cronably-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3c9bb5b906a9e8cd519260a53f624b1e", "sha256": "28d01577276469ba02efc71931a37a38d3f54b84b36aedc7460c631ff4aa7e1d" }, "downloads": -1, "filename": "cronably-1.0.0.tar.gz", "has_sig": false, "md5_digest": "3c9bb5b906a9e8cd519260a53f624b1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8841, "upload_time": "2018-11-15T12:12:03", "url": "https://files.pythonhosted.org/packages/b3/58/d3ad1afc521abe489bccbaccad81ba357048efed4b092c3adb2194b7ac83/cronably-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4c82889539a9db16fc75ac68f0d6fe6b", "sha256": "be673d6651a0c6092e876b4c8d87ff6e62b5bb9c9c2552664f2a01bf6221f7ce" }, "downloads": -1, "filename": "cronably-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "4c82889539a9db16fc75ac68f0d6fe6b", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 14757, "upload_time": "2018-11-15T12:24:00", "url": "https://files.pythonhosted.org/packages/c3/50/c9a0be3804daec2b433db4649374b3d874cb5b1c9b5bb7436a1bad60c6d8/cronably-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b7ee68e8fd56cdef5e3faba6e084777d", "sha256": "7ac8fb37f190d2351d48342f7dd1346920f2ab60475ca43cd10ee4067b6ff5db" }, "downloads": -1, "filename": "cronably-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b7ee68e8fd56cdef5e3faba6e084777d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8910, "upload_time": "2018-11-15T12:24:02", "url": "https://files.pythonhosted.org/packages/50/fd/89a69ba755c647f4b84e392e1a82826c4ad8f1f661ebb2bd6c79a7d2f46d/cronably-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "18e1e429fa7627d55cd052a3dd12dfcb", "sha256": "2749e874edddfe67ded0ed9c02f330a1703b21771a44a6d7b3399bd4ffa2e7b8" }, "downloads": -1, "filename": "cronably-1.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "18e1e429fa7627d55cd052a3dd12dfcb", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 16146, "upload_time": "2018-11-18T14:41:35", "url": "https://files.pythonhosted.org/packages/8d/55/9c4c864fda74d95bb23ffc6abc98396583e77ef3406138dae1f4db4b3717/cronably-1.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad5f98fc3e9321d8bba9b29e0a0212ef", "sha256": "b39a764caf184be354c1aef81e614ed9977d9f3b121ad40b8410851fc5083e7f" }, "downloads": -1, "filename": "cronably-1.1.0.tar.gz", "has_sig": false, "md5_digest": "ad5f98fc3e9321d8bba9b29e0a0212ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9724, "upload_time": "2018-11-18T14:41:37", "url": "https://files.pythonhosted.org/packages/bd/3c/cda304af9bf6ebc05b4c7406510e226f28eb63a3c50a4f3de150d4aade5e/cronably-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "1c15eade256c459fbf0198324f566610", "sha256": "65fa0a598f446df306221dd49d773f2d637a7d22ca4578c3bc2e42f3038c364f" }, "downloads": -1, "filename": "cronably-1.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "1c15eade256c459fbf0198324f566610", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 16570, "upload_time": "2018-11-23T15:19:23", "url": "https://files.pythonhosted.org/packages/ec/d3/fb6703c25b5785529f866b8ad800fc3e9b28a2261d41402d63fa96c0ca83/cronably-1.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cad4272a226b01a5fa2c4713e6c95e3a", "sha256": "fc74bc7a4a0f7e92ce0beb5701c9d579782be645419a2a508fc3a00aad4a9098" }, "downloads": -1, "filename": "cronably-1.2.0.tar.gz", "has_sig": false, "md5_digest": "cad4272a226b01a5fa2c4713e6c95e3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10210, "upload_time": "2018-11-23T15:19:25", "url": "https://files.pythonhosted.org/packages/28/cd/3edc205bcd90f664733ae5f1873bafe86459d7c4c0e23eae2d3c1e3b6505/cronably-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "01a7073075b804f7cb5160acd326cf7c", "sha256": "13c5828a3eba79fe13c667d9718c9e7e832b515eb03f84a1cbcb07e9e1587976" }, "downloads": -1, "filename": "cronably-1.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "01a7073075b804f7cb5160acd326cf7c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 20602, "upload_time": "2018-11-26T11:39:35", "url": "https://files.pythonhosted.org/packages/e7/69/e238e9f6b42803fd50f00283f20ede31aff6433b0dd773fdbc840ac4f567/cronably-1.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d464e3ff32770f37b503b462c10cfb23", "sha256": "19681f24a87f31f663f083d8ad4d73252ead6da4f9ae9c36a9931fe75455c2a2" }, "downloads": -1, "filename": "cronably-1.3.0.tar.gz", "has_sig": false, "md5_digest": "d464e3ff32770f37b503b462c10cfb23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12355, "upload_time": "2018-11-26T11:39:37", "url": "https://files.pythonhosted.org/packages/ba/1e/308d13c91aa7b689b27f371e42ffd167fedf3c25c825900b051e321d7608/cronably-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "c73500fa11b0f27e6115f12d0b852334", "sha256": "3c550e6785f91053ae056f163a71f44cddda24f9e9eca44204e5a131bf66dd1d" }, "downloads": -1, "filename": "cronably-1.3.1-py2-none-any.whl", "has_sig": false, "md5_digest": "c73500fa11b0f27e6115f12d0b852334", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 20605, "upload_time": "2018-12-10T22:40:26", "url": "https://files.pythonhosted.org/packages/d1/20/db5edf62273fc1c400ef651b8ea80c11c83148041aa9dbd347c227db3701/cronably-1.3.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf58c6aa511377f779599ad584ab2efe", "sha256": "4c4f0b6d00dceb815f37276464a4188e4b6c6f96da8711c2480896c1079ff979" }, "downloads": -1, "filename": "cronably-1.3.1.tar.gz", "has_sig": false, "md5_digest": "bf58c6aa511377f779599ad584ab2efe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12290, "upload_time": "2018-12-10T22:40:28", "url": "https://files.pythonhosted.org/packages/5f/44/ebd62f3c8a9dfab94b442227b1905cb266379514d61ab674cc2a666f862b/cronably-1.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c73500fa11b0f27e6115f12d0b852334", "sha256": "3c550e6785f91053ae056f163a71f44cddda24f9e9eca44204e5a131bf66dd1d" }, "downloads": -1, "filename": "cronably-1.3.1-py2-none-any.whl", "has_sig": false, "md5_digest": "c73500fa11b0f27e6115f12d0b852334", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 20605, "upload_time": "2018-12-10T22:40:26", "url": "https://files.pythonhosted.org/packages/d1/20/db5edf62273fc1c400ef651b8ea80c11c83148041aa9dbd347c227db3701/cronably-1.3.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf58c6aa511377f779599ad584ab2efe", "sha256": "4c4f0b6d00dceb815f37276464a4188e4b6c6f96da8711c2480896c1079ff979" }, "downloads": -1, "filename": "cronably-1.3.1.tar.gz", "has_sig": false, "md5_digest": "bf58c6aa511377f779599ad584ab2efe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12290, "upload_time": "2018-12-10T22:40:28", "url": "https://files.pythonhosted.org/packages/5f/44/ebd62f3c8a9dfab94b442227b1905cb266379514d61ab674cc2a666f862b/cronably-1.3.1.tar.gz" } ] }