crontab
Parse and use crontab schedules in Python
What it is and what it does
This package provides a Python interface to parse standard crontab schedule syntax and compute when a scheduled task should next run. It accepts 5–7 field crontab entries (seconds, minutes, hours, day of month, month, day of week, year) and supports common cron syntax including wildcards, ranges, step values, lists, and day/month abbreviations. It also recognizes convenience aliases like @hourly and @daily.
The main use case is determining the delay in seconds from the current time (or a specified datetime) until the next scheduled execution. The package has no runtime dependencies, making it lightweight for embedding in scheduling systems or task runners that need to calculate cron-based execution times without external service calls.
Use it for:
- Calculate next execution time for a cron job in a Python scheduler or task queue
- Validate and parse user-supplied crontab expressions in a web application
- Determine when a recurring background task should run next given a cron schedule
- Build a cron-based job runner that needs to compute delays between executions
- Convert crontab syntax to human-readable descriptions of when tasks will run
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses crontab schedule expressions and calculates the delay in seconds until the next scheduled execution time.
Yes, with conditions. The package is stable, has no dependencies, and solves a specific problem well for applications that need to parse and schedule tasks using standard cron syntax. However, the aging maintenance status (no active development in over a year) and high install friction (source distribution) mean you should verify compatibility with your target Python version before relying on it for new projects. If you need active maintenance or additional scheduling features, consider alternatives.
Install
crontab on PyPI
pip
pip install crontabuv
uv add crontabpoetry
poetry add crontabInstalling crontab
Before you install
High install friction due to source distribution format. Package is in production/stable status with recent maintenance (last commit 2025-07-10) and no known vulnerabilities, but has not received active development in over a year.
License in practice
Licensed under GNU LGPL v2.1 (copyleft). Any derivative work or modification must be released under compatible terms; linking in a proprietary application requires careful license review.
Quickstart
pip install crontab
from crontab import CronTab
from datetime import datetime
entry = CronTab('25 * * * *')
delay = entry.next(datetime(2011, 7, 17, 11, 25))
print(delay) # 3600.0
Verify before relying
- Whether the package works reliably with Python 3.13+ given the aging maintenance status
- Performance characteristics when parsing complex or deeply nested cron expressions
Package facts
| License | GNU LGPL v2.1 (copyleft) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | aging — 401 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,294,223/month — #4,095 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: crontab-1.0.5.tar.gz
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
cronsimParses and evaluates cron expressions to find…
permissive · top 5,000 on PyPI
python-crontabReads, writes, and manipulates system crontab…
copyleft · top 5,000 on PyPI
cronitercroniter iterates over datetime objects using…
permissive · top 1,000 on PyPI
cronexEvaluates cron expressions to determine if a…
permissive · top 15,000 on PyPI
aiocronSchedules async functions to run on cron…
permissive · top 15,000 on PyPI
local-crontabConverts crontab expressions from a local…
permissive · top 15,000 on PyPI
pycronParses cron-style schedule strings and…
permissive · top 5,000 on PyPI
cron-descriptorConverts cron expressions into human-readable…
permissive · top 1,000 on PyPI
quartz-cron-checkerValidates Quartz-style cron expressions against…
unclear · top 15,000 on PyPI
cron-converterParses cron schedule strings into structured…
permissive · top 5,000 on PyPI