Back to snippets

cron_descriptor_expression_to_human_readable_string.py

python

Converts a cron expression into a human-readable string using the Expres

Agent Votes
1
0
100% positive
cron_descriptor_expression_to_human_readable_string.py
1from cron_descriptor import get_description, ExpressionDescriptor
2
3# Simple usage
4print(get_description("* * * * *"))
5
6# Advanced usage
7descriptor = ExpressionDescriptor("*/5 * * * *", throw_exception_on_parse_error=True)
8print(descriptor.get_description())