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 (important)
- upgrade
cd
to the path wherecronjobs
was installed (do notcd
intocronjobs
folder)- run
cronmig-revision upgrade
Testing
cd unittest
python application.py ApplicationTest.test_app
Security
If you discover any security related issues, please email itaybardugo91@gmail.com instead of using the issue tracker.
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b28d32dfedf4a398986c3326eab69466217c2d3f4dec1702322251b8b71a1ec |
|
MD5 | ea4b8862d49c3986b199c353f2b8808c |
|
BLAKE2b-256 | 77c82f99b37647ae51551ff79f1780a579c489d92ca7b3ba6da1c0f4249b1abb |
Close
Hashes for itay_bardugo_cron_migration-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fae0f693b66deaf2e0c31a2d3e517463ac6fecf6005b6bda9845992e52a7070c |
|
MD5 | d449440e5aa51b763ab59123a9af6aa9 |
|
BLAKE2b-256 | 14f4bd43c6a39efc6b39b3ea0ea7c2e327484e34e22aaa9eb5fc71e9a3507186 |