{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/3"}],"enrichment":{"capability":"Parses and evaluates cron expressions to find matching execution times, with support for Debian cron syntax including DST handling, optional seconds field, and advanced features like last-day-of-month and nth-weekday matching.","skillfed_tags":["cron-scheduling","time-expression-parsing"],"use_cases":["Calculate upcoming execution times for a cron job to display in a monitoring dashboard or alert system.","Validate cron expressions and provide user-friendly error messages when syntax is invalid.","Iterate backward in time to find when a job last ran, for audit or debugging purposes.","Generate a text description of a cron schedule for documentation or UI display.","Handle DST transitions correctly when scheduling jobs across timezone boundaries."],"what_it_does":"CronSim is a cron expression parser and evaluator that takes a cron schedule string and a starting datetime, then generates the sequence of datetimes when that schedule would execute. It's designed to match Debian's cron implementation closely, including its handling of Daylight Saving Time transitions and quirky edge cases. The package prioritizes correctness over feature breadth, implementing only the syntax that its primary user (the Healthchecks monitoring service) requires.\n\nYou instantiate a CronSim object with an expression and a datetime, then iterate forward or backward through matching times using Python's iterator protocol. It supports standard five-field cron syntax plus an optional sixth field for seconds, and several non-standard extensions like \"L\" for last-day-of-month, \"LW\" for last-weekday, and \"MON#5\" for nth-weekday-of-month. Invalid expressions raise CronSimError; expressions with no match within 50 years raise StopIteration. Starting from version 2.4, it includes an explain() method to generate human-readable descriptions of expressions.","worth_installing":"Yes. CronSim is a focused, well-maintained library with zero dependencies, permissive licensing, and no known vulnerabilities. Install it if you need to parse or evaluate cron expressions in Python\u2014particularly if you require Debian cron compatibility or advanced features like last-day-of-month matching. The aging maintenance status is not a concern given the stable, narrow scope of the package."},"id":"cronsim","links":{"html":"https://skillfed.io/packages/cronsim","md":"https://skillfed.io/packages/cronsim.md","pypi":"https://pypi.org/project/cronsim/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-10-21","license_spdx":null,"license_treatment":"permissive","name":"cronsim","python_support":"supports_current","summary":"Cron expression parser and evaluator"},"popularity":{"monthly_downloads":14674924,"position":1219,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.7"}
