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 | , - * / |
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:
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}")
Release files for aws-cron-expression-validator 1.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aws_cron_expression_validator-1.0.11.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aws_cron_expression_validator-1.0.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / aws_cron_expression_validator-1.0.11.tar.gz
| Download URL | aws_cron_expression_validator-1.0.11.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4471fb11cd316b6f7fabe11486a5f793abb910d906664996672341d955cf5e2d
|
|
BLAKE2b-256 checksum How to use checksums |
3aa52e1fea782e953f3c0bfc946d8fe2cf5d279924a207bcaa5f50191f480737
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / aws_cron_expression_validator-1.0.11-py3-none-any.whl
| Download URL | aws_cron_expression_validator-1.0.11-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3e90ecf77ad47e93363cccf8864c7319e0a059d83cb58f9854985da640642cf
|
|
BLAKE2b-256 checksum How to use checksums |
05f8bb61566ef5773feee849cf1e87e24309ed3a35f13c8087baacd446801fba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|