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 | , - * / |
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
Close
Hashes for aws_cron_expression_validator-1.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdeeb037d95825651b11ac864d11007e43e10983f41c63ee37612588f4f61de2 |
|
MD5 | 70d170f39c49464f26bd0d80b7a3b4d8 |
|
BLAKE2b-256 | 6474c769fd9ee94ae87e373155e3b2fcc756dd2f98c47860d5a21bc5418f0945 |
Close
Hashes for aws_cron_expression_validator-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c9f3c3c02cf89dcfe6d4b4003c79fe42c3f8976b3182de0dbb15fbade2a9fde |
|
MD5 | cd962a7038b90d4fd711bee8f4663b4b |
|
BLAKE2b-256 | 948c8b872222c06d3c2cc96f21539f1bd659fc6559024413e106382168b36076 |