skillfed

pyawscron

An AWS Cron Parser

pyawscron v1.0.7 797.0K downloads/30d#5,032 on PyPI12
Permissive license DORMANT released

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 pyawscron

uv

uv add pyawscron

poetry

poetry add pyawscron

Installing 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

License :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

aws cron expression parsercloudwatch schedule calculatorcron occurrence finderparse aws cron syntaxnext scheduled time awscron datetime iteratoraws eventbridge cron
aws-integrationscheduling

More Utilities packages