Menu

Tree [468d69] master /
 History

HTTPS access


File Date Author Commit
 doc 2012-06-29 Kevin Lyda Kevin Lyda [4ab7e4] Fix license blurb on manpage.
 tests 2016-08-10 Hanspeter Spalinger Hanspeter Spalinger [1f8af0] update tests to test for new options
 utils 2012-05-26 Kevin Lyda Kevin Lyda [f55b63] Add docs and some utils.
 .gitignore 2017-01-04 Kevin Lyda Kevin Lyda [46f47d] Fixes to get versioning working.
 .gitlab-ci.yml 2017-01-04 Kevin Lyda Kevin Lyda [e973f1] Need git to do a build.
 .pylintrc 2012-06-18 Kevin Lyda Kevin Lyda [4d96a8] Merge branch 'master' of https://code.google.co...
 .travis.yml 2017-01-02 Kevin Lyda Kevin Lyda [1cddc0] Add pypy test support.
 CHANGELOG 2017-01-04 Kevin Lyda Kevin Lyda [584172] Spel chek.
 CONTRIBUTING.md 2017-01-04 Kevin Lyda Kevin Lyda [e53438] Add a contribution guide.
 LICENSE 2012-04-28 Kevin Lyda Kevin Lyda [a581e3] Initial commit.
 MANIFEST.in 2012-06-18 Kevin Lyda Kevin Lyda [4d96a8] Merge branch 'master' of https://code.google.co...
 README.rst 2017-01-04 Kevin Lyda Kevin Lyda [468d69] Changes for RPM packaging; update readme.
 chkcrontab 2017-01-04 Kevin Lyda Kevin Lyda [8af2b2] Language cleanup.
 chkcrontab-logo.png 2013-04-07 Kevin Lyda Kevin Lyda [ca331a] Add logo.
 chkcrontab_lib.py 2017-01-04 Kevin Lyda Kevin Lyda [2b25a8] Make the -q switch more effective.
 setup.py 2017-01-04 Kevin Lyda Kevin Lyda [468d69] Changes for RPM packaging; update readme.
 tox.ini 2013-02-18 Kevin Lyda Kevin Lyda [bbd3c2] Test for python 3.3.

Read Me

chkcrontab

<object data="https://gitlab.ie.suberic.net/kevin/chkcrontab/badges/master/build.svg" type="image/svg+xml">Home build status</object> <object data="https://gitlab.ie.suberic.net/kevin/chkcrontab/badges/master/coverage.svg" type="image/svg+xml">Home coverage status</object> Build status

Crontab linter

chkcrontab is a script to check crontab files like those in /etc/cron.d and /etc/crontab. It tries to catch glaring errors and warn on suspect lines in a crontab file. Some valid lines will generate warnings. Certain silly yet valid crontab lines will generate errors as well.

Run this by doing:

chkcrontab crontab_file

Errors will cause a non-zero exit code. Warnings alone will not.

To see sample output for a bad crontab, run the following:

./chkcrontab ./tests/test_crontab

See the ./tests/test_crontab.disable crontab for how to disable warnings and errors.

Output Description

The output of chkcrontab is described on the CheckCrontab wiki page. A link to it appears in the output if there were any warnings or errors. It also suggests ways to fix the reported issues.

Contributions

Contributions are welcome! Please add unit tests for new features or bug fixes. To run all the unit tests run ./setup test. If you have tox installed, just run tox.

You can review coverage of added tests by running coverage run setup.py test and then running coverage report -m.

Note that tests are run on Travis for all supported python versions whenever the tree on github is pushed to.

The packaged version is available via pip or easy_install as chkcrontab. The project page is on pypi:

The source code is available in the following locations:

Pull requests on any of those platforms or emailed patches are fine. Opening issues on gitlab or github is easiest, but I'll check any of them.

Packaging

For rpm distributions, ./setup.py bdist --formats=rpm should make an rpm but currently dies due to not finding the chkcrontab.1 man page.

For Debian distributions there's an additional tool that might work.

TODO

Credits

  • Kevin Lyda: Who got burned one too many times by broken crontabs.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.