A Python3 script for checking syntax and correctness of crontab files
Project description
Checkcrontab - check syntax in crontab files
A Python script for checking syntax of crontab files. Cross-platform support for Linux, macOS, and Windows.
English | Español | Português | Français | Deutsch | Italiano | Русский | 中文 | 日本語 | हिन्दी
Requirements
- Python 3.7 or higher
- Linux/Unix system with systemctl (for daemon checks)
- Read access to
/etc/crontab(on Linux)
Installation
pip3 install checkcrontab
Or from GitHub:
pip3 install git+https://github.com/wachawo/checkcrontab.git
Usage
# Check system crontab (Linux only)
checkcrontab
# Check crontab file
checkcrontab /path/to/crontab
# Check user crontab
checkcrontab username
# Check with explicit type flags
checkcrontab -S system.cron -U user.cron -u username1 -u username2
# Show help
checkcrontab --help
# Show version
checkcrontab --version
Command Line Options
-S, --system- System crontab files-U, --user- User crontab files-u, --username- Usernames to check-v, --version- Show version-d, --debug- Debug output-n, --no-colors- Disable colored output
Features
- ✅ Cross-platform support (Linux, macOS, Windows)
- ✅ System and user crontab validation
- ✅ Time field validation (minutes, hours, days, months, weekdays)
- ✅ User existence validation (Linux/macOS)
- ✅ Dangerous command detection
- ✅ Special keyword support (@reboot, @daily, etc.)
- ✅ Multi-line command support
📖 Detailed Features Documentation - Comprehensive guide to supported syntax, valid values, examples, and error messages.
Development Tools
pip3 install pre-commit flake8 pytest mypy ruff
pre-commit install
pre-commit run --all-files
pre-commit autoupdate
License
MIT License
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file checkcrontab-0.0.6.tar.gz.
File metadata
- Download URL: checkcrontab-0.0.6.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c69d5d32f06e4934e56789e869909e93c20d754cdbc1bb81a3516a9fab4d12b6
|
|
| MD5 |
cae616e18f1d9baa5d187623fb9d3917
|
|
| BLAKE2b-256 |
d6c64d51f454123405d137c8d6402d17b39327a4c567b0900ed97c6c2d85a799
|
Provenance
The following attestation bundles were made for checkcrontab-0.0.6.tar.gz:
Publisher:
publish.yml on wachawo/checkcrontab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
checkcrontab-0.0.6.tar.gz -
Subject digest:
c69d5d32f06e4934e56789e869909e93c20d754cdbc1bb81a3516a9fab4d12b6 - Sigstore transparency entry: 435311635
- Sigstore integration time:
-
Permalink:
wachawo/checkcrontab@84eb5960a76ff23e312c389f06764f8c950af530 -
Branch / Tag:
refs/tags/0.0.6 - Owner: https://github.com/wachawo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@84eb5960a76ff23e312c389f06764f8c950af530 -
Trigger Event:
push
-
Statement type:
File details
Details for the file checkcrontab-0.0.6-py3-none-any.whl.
File metadata
- Download URL: checkcrontab-0.0.6-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ed3badf63e645ce4aa6fae46a77a7da4e6cb4a6078a780d451efa156356c197
|
|
| MD5 |
1765489966ee4dc7b881e71f4d5c7078
|
|
| BLAKE2b-256 |
0bc0af1fe7aec6630df0567fe35d375e76be8c075444fc09ec4ca40d0f748ebf
|
Provenance
The following attestation bundles were made for checkcrontab-0.0.6-py3-none-any.whl:
Publisher:
publish.yml on wachawo/checkcrontab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
checkcrontab-0.0.6-py3-none-any.whl -
Subject digest:
7ed3badf63e645ce4aa6fae46a77a7da4e6cb4a6078a780d451efa156356c197 - Sigstore transparency entry: 435311663
- Sigstore integration time:
-
Permalink:
wachawo/checkcrontab@84eb5960a76ff23e312c389f06764f8c950af530 -
Branch / Tag:
refs/tags/0.0.6 - Owner: https://github.com/wachawo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@84eb5960a76ff23e312c389f06764f8c950af530 -
Trigger Event:
push
-
Statement type: