jps-crontab-utils
Collection of Python utilities for parsing, validating, and searching crontab files.
🚀 Overview
jps-crontab-utils provides three command-line tools:
1. Crontab Parser
Parses raw crontab files into structured job objects:
- Supports per-job metadata via comment blocks
- Handles multiline commands with POSIX
\continuation - Resolves executables using
$PATHor absolute paths - Normalizes metadata keys automatically (
owner-email→owner_email)
2. Crontab Checker
Validates each cron job for:
- Required metadata (owner, owner email, reference, repository, etc.)
- Recommended metadata (labels, run frequency, description, etc.)
- Executable existence, file type, +x bit, and non-empty status
- Outputs human-readable tables or JSON for automation
3. Crontab Search Utility
Queries crontab entries based on:
- Labels (
--label nightly) - Owner email (
--email john.smith) - Code repository (
--repo git@gitlab.com:org/pipeline.git) - Full JSON output for programmatic analysis
These utilities help improve crontab hygiene, enforce team standards, and identify broken or undocumented jobs across large environments.
Features
- 🔍 Search cron jobs using metadata filters
- 📝 Parse job schedule, command, metadata
- 🛠 Validate executables and metadata completeness
- 📈 Rich terminal tables (typer + rich)
- 📦 JSON output for CI/CD and automation
- 🧪 100% test-covered parser and search modules
Example Usage
Parse and inspect a crontab
jps-crontab-parse --file /etc/crontab
Search for jobs labeled “nightly”
jps-crontab-search --file crontab.txt --label nightly
Audit a crontab
jps-crontab-check --file crontab.txt
JSON mode for pipelines
jps-crontab-check --file crontab.txt --json | jq .
📦 Installation
make install
pip install jps-crontab-utils
🧪 Development
make fix && make format && make lint
make test
📜 License
MIT License © Jaideep Sundaram
Documentation
📘 Full documentation: see docs/USAGE.md
Metadata
Release files for jps-crontab-utils 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jps_crontab_utils-0.1.0.tar.gz | 14.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jps_crontab_utils-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.0 kB
Release files / jps_crontab_utils-0.1.0.tar.gz
| Download URL | jps_crontab_utils-0.1.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddafe7c9de28449703e17cf7a293b59830a6cfdeee7e095b64849186fbacb0da
|
|
BLAKE2b-256 checksum How to use checksums |
32f7f9daf7598505bfce53e0acac1267671ab1e02884b40f0bf143b2726d7eed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / jps_crontab_utils-0.1.0-py3-none-any.whl
| Download URL | jps_crontab_utils-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a19bf53c0331f290d3047e0d4d15824e858c632173980893f9aeab9f60a7aa76
|
|
BLAKE2b-256 checksum How to use checksums |
cc29383a2c4887c50ded770c2dc3181d7f503254974e5373fe6477fcf71194b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|