crontab_parser
Parser for Crontab expressions.
Attributes
| Attribute | Type | Description |
|---|---|---|
| ParseException | type = ParseException | Reference to the exception class raised when the crontab expression fails to parse correctly. |
Constructor
Signature
def crontab_parser(
max_: int = 60,
min_: int = 0
)
Parameters
| Name | Type | Description |
|---|---|---|
| max_ | int = 60 | The maximum number of units in the range (e.g., 60 for minutes, 24 for hours). |
| min_ | int = 0 | The minimum starting value for the range (e.g., 0 for minutes, 1 for months). |
Signature
def crontab_parser(
max_: int = 60,
min_: int = 0
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| max_ | int = 60 | The total number of units in the range (e.g., 60 for minutes, 24 for hours). |
| min_ | int = 0 | The starting value of the range, typically 0 or 1. |
Methods
parse()
@classmethod
def parse(
spec: str
) - > set[int]
Parses a full crontab expression string and expands it into a set of integers.
Parameters
| Name | Type | Description |
|---|---|---|
| spec | str | The crontab expression string to parse, such as '*/15' or '1,3-5'. |
Returns
| Type | Description |
|---|---|
set[int] | A set of unique integers representing the expanded time units. |