skillfed

crontab

Parse and use crontab schedules in Python

crontab v1.0.5 1.3M downloads/30d#4,095 on PyPI337
Copyleft license GNU LGPL v2.1 AGING released

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 crontab

uv

uv add crontab

poetry

poetry add crontab

Installing 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

Development Status :: 5 - Production/StableLicense :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)Programming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.2Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

cron schedule parsercrontab expression calculatornext execution timecron delay calculationschedule timing in pythoncron entry parserjob scheduling helper
schedulingcron-parsertime-calculation

More Utilities packages