ValidatesAWS EventBridge cron expressions, which are similar to, but not compatible with Unix style cron expressions
Project description
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 | , - * / |
NB: It appears AWS is supporting the Quartz Job Scheduler cron expressions. More details than AWS provides is available in the Cron Trigger Tutorial.
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}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aws_cron_expression_validator-1.1.13.tar.gz
.
File metadata
- Download URL: aws_cron_expression_validator-1.1.13.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54309ebbed5ad203289a7ceaed9f379f772bc3d0229e9e360ff0018d620e41b4 |
|
MD5 | f11d0a105731a38b802dffa716ae29b8 |
|
BLAKE2b-256 | 13d53830aec4c1c4851324f59d19d95152b399251f67bf4657307e9dcff8d0d6 |
File details
Details for the file aws_cron_expression_validator-1.1.13-py3-none-any.whl
.
File metadata
- Download URL: aws_cron_expression_validator-1.1.13-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d991295a5da358350e069f1e462415d24a301823c07e97a299f5bd4389c3b657 |
|
MD5 | c8bf0429a86536c868ec14d464d559f8 |
|
BLAKE2b-256 | 3ba098b168e8722202a2d2442c2d9989afbc3b10534613b134b4fe939ccfe45c |