pyawscron
An AWS Cron Parser
What it is and what it does
Pyawscron is a Python port of an AWS cron expression parser that interprets CloudWatch cron syntax and calculates matching UTC datetimes. It supports the full AWS cron field syntax—minutes, hours, day-of-month, month, day-of-week, and year—with all standard wildcards including the AWS-specific ones (L for last day, W for weekday, # for nth occurrence). The package depends only on python-dateutil for datetime handling.
You use it by instantiating an AWSCron object with a cron expression string, then calling methods to find the next or previous occurrence from a given datetime, or to fetch all matching times within a date range. It offers both iterative methods (next/prev) for memory-efficient streaming and batch methods (get_all_schedule_bw_dates, get_next_n_schedule, get_prev_n_schedule) for retrieving multiple results at once.
Use it for:
- Calculate when an AWS EventBridge or CloudWatch scheduled rule will next trigger from a given time.
- Audit or verify the execution schedule of existing AWS cron expressions in your infrastructure.
- Generate a list of upcoming scheduled event times for display in a dashboard or report.
- Test cron expressions locally before deploying them to AWS CloudWatch or EventBridge.
- Backfill or replay historical scheduled events by finding all occurrences in a past date range.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and iterates over AWS CloudWatch cron expressions to find matching UTC datetimes, moving forward or backward from a given point.
Yes, if you need to parse AWS cron expressions in Python. The package is stable, has no known vulnerabilities, and carries a permissive license. However, maintenance is dormant—no updates since the last commit in August 2024—so it will not receive fixes for new AWS cron features or Python compatibility issues. Use it for read-only cron parsing and scheduling queries; do not rely on it for active feature development.
Install
pyawscron on PyPI
pip
pip install pyawscronuv
uv add pyawscronpoetry
poetry add pyawscronInstalling pyawscron
Before you install
Low install friction with a single runtime dependency (python-dateutil). Maintenance is dormant—last commit was 2024-08-14 but no releases since then; the package is stable but unlikely to receive updates for new AWS cron features or Python versions.
License in practice
BSD License (permissive). You can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
from pyawscron import AWSCron
import datetime
aws_cron = AWSCron("0 5 4 * ? *")
dt = datetime.datetime(2021, 8, 7, 8, 30, 57, tzinfo=datetime.timezone.utc)
result = AWSCron.get_next_n_schedule(10, dt, "0/23 * * * ? *")
Requires Python 3.6 or later.
Verify before relying
- Whether the package correctly handles all AWS cron wildcard edge cases (L, W, # in day fields) in practice.
- Performance characteristics when querying large date ranges or high-frequency schedules.
- Compatibility with recent AWS CloudWatch cron expression updates or format changes.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — python-dateutil |
| Maintenance | dormant — 730 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 797,038/month — #5,032 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyawscron-1.0.7-py3-none-any.whl
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
aws-croniterParses, validates, and calculates occurrences…
permissive · top 15,000 on PyPI
tzcronParse and iterate over cron/quartz schedule…
permissive · top 15,000 on PyPI
cronitercroniter iterates over datetime objects using…
permissive · top 1,000 on PyPI
aws-cron-expression-validatorValidates AWS EventBridge cron expressions,…
permissive · top 15,000 on PyPI
pycronParses cron-style schedule strings and…
permissive · top 5,000 on PyPI
snaptimeSnaptime transforms timestamps using a simple…
unclear · top 15,000 on PyPI
cron-validatorValidates Unix cron expressions, matches them…
permissive · top 5,000 on PyPI
cronexEvaluates cron expressions to determine if a…
permissive · top 15,000 on PyPI
cronsimParses and evaluates cron expressions to find…
permissive · top 5,000 on PyPI
cron-converterParses cron schedule strings into structured…
permissive · top 5,000 on PyPI