AWSCronExpressionValidator
Validates these AWS EventBridge cron expressions, which are similar to, but not compatible with Unix style cron expressions;
| Field | Values | Wildcards |
|---|---|---|
| Minute | 0-59 | , - * / |
| Hour | 0-23 | , - * / |
| Day-of-month | 1-31 | , - * ? / L W |
| Month | 1-12 or JAN-DEC | , - * / |
| Day-of-week | 1-7 or SUN-SAT | , - * ? L # |
| Year | 1970-2199 | , - * / |
- It appears AWS's wildcard support borrows heavily from Quartz Job Scheduler cron expressions. More documentation about wildcard handling than AWS provides is available in the Cron Trigger Tutorial. NB: AWS doesn't support seconds (i.e. AWS has 6 fields, while Quartz has 7), so ignore the first field in the Quartz documenation.
This was inspired by Niloy Chakraborty's AWSCronValidator.py project.
Installing
To install the library run;
pip install aws-cron-expression-validator
Usage
from aws_cron_expression_validator.validator import AWSCronExpressionValidator, AWSCronExpressionMinuteError
my_expression = "0 180 ? * MON-FRI *"
try:
AWSCronExpressionValidator.validate(my_expression)
except AWSCronExpressionMinuteError as e:
print(f"Oh no! My expression has an invalid minute field: {e}")
except ValueError as e:
print(f"Oh no! My expression was invalid: {e}")
Metadata
Release files for aws-cron-expression-validator 1.1.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aws_cron_expression_validator-1.1.15.tar.gz | 4.7 kB | Without provenance | Details for aws_cron_expression_validator-1.1.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aws_cron_expression_validator-1.1.15-py3-none-any.whl | Python 3 | none | any | Details for aws_cron_expression_validator-1.1.15-py3-none-any.whl |
Total release size: 10.2 kB
Release files / aws_cron_expression_validator-1.1.15.tar.gz
| Download URL | aws_cron_expression_validator-1.1.15.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84a67e469e0bead61358620772fc1283df73ebd9558f390318b46d13add12126
|
|
BLAKE2b-256 checksum How to use checksums |
305eaf7ed74e57dd28f97fe613ce19dee36d7aa394d9127dc84d11bd6fd8aaf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / aws_cron_expression_validator-1.1.15-py3-none-any.whl
| Download URL | aws_cron_expression_validator-1.1.15-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96e77d4954f3bd0bf138769802f986ca0a068d15b2b613a2e0ae157bb537e1c8
|
|
BLAKE2b-256 checksum How to use checksums |
25a2c0e0d7e875c479d8bb7f1e70127c5fcd73acdf6ca5c086f1509852b80a04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for aws-cron-expression-validator 1.1.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.