Skip to main content

Croninfo

PyPi Version PyPi License CI Tests Code style: black

Croninfo is a CLI which provides the functionality of parsing cron expressions and rendering an output to ease with understanding the schedule of the cron expression.

The Cron syntax supported is based on the definition provided by FreeBSD.

Getting Started

Python 3.7 to 3.10 supported

To get started, install with pip:

$ python -m pip install croninfo

Usage

CLI

To CLI is provided with one command parse as can be seen below. If any doubts you can run croninfo --help or croninfo <command> --help for further details.

$ croninfo parse "10 0 1,15 * 1-3 /usr/bin/find"
╭─ Cron Expression ──────────────────────────────────────────────────────────────────────────────╮
│ Minute               10                                                                        │
│ Hour                 0                                                                         │
│ Day of Month         1 15                                                                      │
│ Month                1 2 3 4 5 6 7 8 9 10 11 12                                                │
│ Day of Week          1 2 3                                                                     │
│ TZ                   UTC                                                                       │
│ Command              /usr/bin/find                                                             │
│ Next Scheduled Run   2022-08-15T00:10:00+00:00 (in 10 days, 2 hours, 3 minutes and 25 seconds) │
╰─ 10 0 1,15 * 1-3 /usr/bin/find ────────────────────────────────────────────────────────────────╯

This will output with consideration to UTC by default but you can pass --tz-type local to override to be your local timezone, E.G. Europe/London. As shown below:

$ croninfo parse "10 0 1,15 * 1-3 /usr/bin/find" --tz-type local
╭─ Cron Expression ──────────────────────────────────────────────────────────────────────────────╮
│ Minute               10                                                                        │
│ Hour                 0                                                                         │
│ Day of Month         1 15                                                                      │
│ Month                1 2 3 4 5 6 7 8 9 10 11 12                                                │
│ Day of Week          1 2 3                                                                     │
│ TZ                   Europe/London                                                             │
│ Command              /usr/bin/find                                                             │
│ Next Scheduled Run   2022-08-15T00:10:00+01:00 (in 10 days, 1 hour, 2 minutes and 25 seconds)  │
╰─ 10 0 1,15 * 1-3 /usr/bin/find ────────────────────────────────────────────────────────────────╯

Alternatively, you can use the Official Croninfo Docker Image

Release files for croninfo 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for croninfo 1.0.1
File Size Uploaded
croninfo-1.0.1.tar.gz 10.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for croninfo 1.0.1
File Interpreter ABI Platform
croninfo-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.1 kB

Release files / croninfo-1.0.1.tar.gz

Download URL croninfo-1.0.1.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eac4128715a5edfe35771e9c3e1cea543bbfbdd620bb90e838dcd475727da341
BLAKE2b-256 checksum
How to use checksums
2f5883742baa773b1dfd8123670ea252f41531de7bc09c50160f27e22c8e8a8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / croninfo-1.0.1-py3-none-any.whl

Download URL croninfo-1.0.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93c596b202ea0e0b9fdab626a0fb22fd5f7382514183ed4e8b43e823e5991f70
BLAKE2b-256 checksum
How to use checksums
d547919fb8198ae4341afd680709bd500d1ebbee43ef4900775021325977470b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page