Reading — step 1 of 5
Read
~1 min readCron Expression Parser
Parsing Field Types
Each field expands to a set of allowed values for that time component.
The grammar inside a single field:
| Form | Meaning | Example | Expands to |
|---|---|---|---|
* | any value | * | full range |
<n> | single value | 5 | {5} |
<a>-<b> | inclusive range | 9-12 | {9,10,11,12} |
<a>,<b>,<c> | list | 1,3,5 | {1,3,5} |
<x>/<step> | step over x (which may be * or a range) | */15 | {0,15,30,45} for minute |
<a>-<b>/<s> | step over a range | 0-30/10 | {0,10,20,30} |
The output of this lesson is just the expanded set for one field at a time, for a given expected min/max range.
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…