Skip to content
This repository has been archived by the owner on Sep 17, 2018. It is now read-only.
/ pretty-cron Public archive
forked from ben-davis/prettycron

Converts crontab expressions to human-readable descriptions

License

Notifications You must be signed in to change notification settings

adamchainz/pretty-cron

 
 

Repository files navigation

pretty-cron

Retired in favour of cron_descriptor.

This project is no longer maintained.

Converts crontab expressions to human-readable descriptions.

Installation

Use pip:

pip install pretty-cron

Tested on Python 2.7 and 3.6.

API

prettify_cron(cron_expression)

Converts the given string cron expression into a pretty, human-readable, English description of what it means. If the string is not a valid cron expression, or it includes features not currently supported, it is returned as-is.

For example:

>>> import pretty_cron
>>> pretty_cron.prettify_cron("0 * * * *")
"At 0 minutes past every hour of every day"
>>> pretty_cron.prettify_cron("0 0 1 1 *")
"At 00:00 on the 1st of January"
>>> pretty_cron.prettify_cron("12 15 * 1 *")
"At 15:12 every day in January"
>>> pretty_cron.prettify_cron("lalala")  # Not a cron expression
"lalala"

About

Converts crontab expressions to human-readable descriptions

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages

  • Python 100.0%