Skip to main content

A Python3 script for checking syntax and correctness of crontab files

Project description

Checkcrontab - check syntax in crontab files

CI PyPI Python

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 /etc/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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

checkcrontab-0.0.7.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

checkcrontab-0.0.7-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file checkcrontab-0.0.7.tar.gz.

File metadata

  • Download URL: checkcrontab-0.0.7.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

Hashes for checkcrontab-0.0.7.tar.gz
Algorithm Hash digest
SHA256 bd0700cb3f9c2089f3bbda3783e8d88ce180c95f6387d791f78675af75b9ec4b
MD5 bf7e22fd75ffb8c1a9c91f092142a6fc
BLAKE2b-256 a24f5e41525e5a8beb8d79268e0d7802e864a676d29da8de1e33a7937c80db5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for checkcrontab-0.0.7.tar.gz:

Publisher: publish.yml on wachawo/checkcrontab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file checkcrontab-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: checkcrontab-0.0.7-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

Hashes for checkcrontab-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 542fe115ebd9f1d12a801ad58d646d6eb5412471da164794bf2527c103c2e4cd
MD5 b5e809e8a52732a89d01bf86aae9e6e7
BLAKE2b-256 b2f49faf257e32829c1e3cb1af84530c79e13587e3d6fdd9a1210d914d4a7482

See more details on using hashes here.

Provenance

The following attestation bundles were made for checkcrontab-0.0.7-py3-none-any.whl:

Publisher: publish.yml on wachawo/checkcrontab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page