--- id: pycron version: "3.2.0" license: MIT license_treatment: permissive maintenance: aging --- # pycron — Simple cron-like parser, which determines if current datetime matches conditions. License: permissive · Maintenance: aging · Downloads: 2.1M/mo ## What it is and what it does Pycron is a lightweight cron schedule parser that evaluates whether a given datetime matches a cron-style schedule string. It implements standard cron syntax: wildcards (*), intervals (*/5), ranges (4-10), lists (6,8,23), and single values. The main entry point is `is_now(s, dt=None)`, which returns True if the provided datetime (or current time if omitted) matches the schedule. It also offers `has_been(s, since, dt=None)` for checking whether a schedule would have matched at any point in a past interval—useful for non-continuous applications. The package works with both timezone-aware and naive datetimes and supports alternative datetime libraries like Arrow, Delorean, Pendulum, and udatetime. Helper constants for Django form choices are included. The package has no runtime dependencies and installs as a pure Python wheel, making it a minimal addition to any project. It's designed for simple scheduling logic rather than as a full task scheduler; typical use cases include checking whether a background job should run now or validating cron expressions in configuration. Use it for: - Validate whether a scheduled task should execute at the current moment in a non-continuous application. - Check if a specific datetime matches a user-provided cron schedule string in a web form or API. - Generate Django form choice lists for minute, hour, day-of-month, month, and day-of-week cron fields. - Determine if any point in a past time window matched a schedule (anacron-like behavior for catch-up jobs). - Parse and evaluate cron expressions in configuration files or database records. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses cron-style schedule strings and determines whether a given datetime matches the schedule, supporting standard cron syntax like intervals, ranges, lists, and wildcards. Yes. Pycron is a stable, dependency-free utility for cron schedule matching with no known vulnerabilities. It supports current Python versions and is suitable for any project needing to evaluate cron expressions. The aging maintenance status is not a blocker—the package is mature and unlikely to require frequent updates. Install it if you need simple cron parsing without the overhead of a full task scheduler. ## Install pip install pycron uv add pycron poetry add pycron ## Installing pycron Before you install: Low friction: pure Python wheel with no runtime dependencies. Maintenance is aging—last commit was 2025-10-08, but the package has been stable since its 2015-11-18 first release and supports current Python versions (3.9–3.13). License in practice: MIT license is permissive; you can use, modify, and distribute pycron freely in commercial and private projects with minimal restrictions. Quickstart: import pycron # Check if current time matches a cron schedule if pycron.is_now('*/5 * * * *'): print('Runs every 5 minutes') # Check if a specific datetime matches from datetime import datetime dt = datetime(2025, 6, 5, 12, 0) if pycron.is_now('0 * * * *', dt): print('Matches at minute 0 of every hour') Verify before relying: - Whether the package is actively maintained or in maintenance-only mode (last commit 2025-10-08 is recent, but status is 'aging'). - Performance characteristics when evaluating many schedules or with high-frequency calls. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 2.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags cron schedule parser, cron expression matching, check if time matches cron, cron datetime validator, cron-like scheduling, parse cron strings python, scheduling, cron-parser, datetime [View on SkillFed](https://skillfed.io/packages/pycron) · [View on PyPI](https://pypi.org/project/pycron/)