Skip to main content

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:

  1. a CLI revision system, which can generate/upgrade/downgrade revision files by simple commands.
  2. 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

  1. unix OS
  2. crontab installed on your machine

Installation

pip

pip install itay-bardugo-cron-migration -U

Usage

Basic Usage

  1. init a new environment
    1. cd to your desired path
    2. run cronmig init.
    3. this command composes a new cronjobs folder with all needed files.
    4. its recommended to run this command from your top root folder.
    5. +-- project (-> you are here)
      |   +-- unittest
      |   +-- project
      |       +-- systemfile.py
      
    6. uploadcronjobs folder to git, except .json and .rvsn files (its ok if it doest not exist, the engine generates it later)
  2. generate a new revision file
    1. cd to the path where cronjobs was installed (do not cd into cronjobs folder)
    2. run cronmig-revision make [replace-with-short-description]
    3. this commands generates a new revision file
    4. add this file to GIT or any other VCS (important)
  3. upgrade
    1. cd to the path where cronjobs was installed (do not cd into cronjobs folder)
    2. run cronmig-revision upgrade

Branching

Once you create a new branch, you should tell python-cron-migration to start a new revision file, which represents the beginning of your changes of the current branch (because all of the revision files from all branches are exist within the "master" repo) in order to separate non-relevant revision files and treat it like it was the first revision file that was ever made. In oredr to make it happen, just use the -h(short of "head") flag when running cronmig-revision make [message] command.

Actually it looks like this:

cronmig-revision make -h "my new revision head file"

it creates a new revision file, but with no reference to any previous revision file.

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.

Metadata

Release files for itay-bardugo-cron-migration 1.1.36

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for itay-bardugo-cron-migration 1.1.36
File Size Uploaded
itay-bardugo-cron-migration-1.1.36.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for itay-bardugo-cron-migration 1.1.36
File Interpreter ABI Platform
itay_bardugo_cron_migration-1.1.36-py3-none-any.whl Python 3 none any Details

Total release size: 39.6 kB

Release files / itay-bardugo-cron-migration-1.1.36.tar.gz

Download URL itay-bardugo-cron-migration-1.1.36.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a23fb73b45a0e932e289d98752dff651119f8ddc886f852f88e4a259e3870a46
BLAKE2b-256 checksum
How to use checksums
bd771210a2bf0970efebd5bac29c77f6909fc9f709637ffdb163b2b2e903719b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

Release files / itay_bardugo_cron_migration-1.1.36-py3-none-any.whl

Download URL itay_bardugo_cron_migration-1.1.36-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41d3fa693a6448509819535d607493a374fbd36eb34bb933536d159bfd97caba
BLAKE2b-256 checksum
How to use checksums
daa97244b2e1d710255cdb553e1da5ee525d2c6e5ed9bdc718dcfed7027c9c1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

1.1.36 This release

2 release files

1.1.35

2 release files

1.1.34

2 release files

1.1.33

2 release files

1.1.32

2 release files

1.1.31

2 release files

1.1.30

2 release files

1.1.29

2 release files

1.1.28

2 release files

1.1.27

2 release files

1.1.26

2 release files

1.1.25

2 release files

1.1.24

2 release files

1.1.23

2 release files

1.1.22

2 release files

1.1.21

2 release files

1.1.20

2 release files

1.1.19

2 release files

1.1.18

2 release files

1.1.17

2 release files

1.1.16

2 release files

1.1.15

2 release files

1.1.14

2 release files

1.1.13

1 release file

1.1.12

1 release file

1.1.11

1 release file

1.1.10

1 release file

1.1.9

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page