ivica-k / cronrange.info

3 stars 0 forks source link

cron_range Build Status

Displays the next N number of executions for a given cron expression from a given datetime. Now with support for AWS EventBridge expressions!

Usage

Web

Visit cronrange.info

CLI

Use cronrange-cli

Local API server

make local
curl -H "Content-Type:application/json" \
 -d '{"executions": "10", "cron":"*/5 * * * *"}' \
 localhost:8000
JSON structure
Key Description Default value
cron A cron expression (string) None
executions Number of next executions to show. 10
start_date Date and time in DD.MM.YYYY. HH:MM format from which to calculate cron executions. Current date and time.

AWS EventBridge support

AWS EventBridge implementation of cron does not use 0 based day of week, instead it is 1-7 SUN-SAT (instead of 0-6), as well as supporting additional expression features such as first-weekday and last-day-of-month. Source

Because of that, cronrange does not support the full range of expression wildcards available on AWS EventBridge.

Wildcard Example expression Supported
L */5 * L * ? * Yes
W */30 * 1W * ? * No
# */30 * ? * 3#2 * No
? 0 8 1 * ? * Yes

Classic cron expression wildcards such as ,, /, - and * are supported.

For developers

Virtualenv setup

make venv

Running tests

make test

Running a local server

make local