manage your cron jobs with python and a revision system(CLI)
Project description
python-cron-migration
python-cron-migration is a CLI package that was built for helping you manage your cronjobs by revisions files system. It contains two main components:
- a CLI revision system, which can generate/upgrade/downgrade revision files by simple commands.
- a lightweight crontab high-level package which integrates with the
crontab
library on your OS
commands
entry point | command | example | description |
---|---|---|---|
cronmig | init | cronmig init | initializes a new environment |
cronming-revision | make | cronmig-revision make [filename] |
generates a new revision file . [filename] should be a short description of your revision file |
cronming-revision | upgrade | cronmig-revision upgrade | upgrades all non-upgraded files by invoking the upgrade method within your revision file |
cronming-revision | downgrade | cronmig-revision downgrade [steps] |
downgrades revisions files [steps] times. [steps] is the number of downgrading (from the most upgraded file) |
System requirements
- unix OS
- crontab installed on your machine
Installation
pip
pip install itay-bardugo-cron-migration -U
Usage
- init a new environment
cd
to your desired path- run
cronmig init
. - this command composes a new
cronjobs
folder with all needed files. - its recommended to run this command from your top root folder.
-
+-- project (-> you are here) | +-- unittest | +-- project | +-- systemfile.py
- upload
cronjobs/revisions
folder to git. (do not upload any other file.)
- generate a new revision file
cd
to the path wherecronjobs
was installed (do notcd
intocronjobs
folder)- run
cronmig-revision make [replace-with-short-description]
- this commands generates a new revision file
- add this file to GIT or any other VCS
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for itay-bardugo-cron-migration-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3856a8a436ffca05c7771c3092bb68694fe3981a63d3297df4b4993285fdb39c |
|
MD5 | 3de9c15098fea22fff8be8ab8fefbc12 |
|
BLAKE2b-256 | 028e4e97431d493641b6b4d3c5a3a52a49ff717b39829105cc4572db7167d5a5 |
Close
Hashes for itay_bardugo_cron_migration-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 073b6751946f18a06d96fdfe0180a0a1b9cb4f4dc890050d0eb9ad3240021f48 |
|
MD5 | 00a04cf86b0e864596b62c3e8cac38e8 |
|
BLAKE2b-256 | ccfabdcadc477396f675c65bb11336c40f819ef3188b5579f61a51fa7089584d |