pub fn expand_alias(s: &str) -> Result<String>Expand description
Expand cron alias strings (like @hourly, @daily 9:30) into standard
5-field cron expressions. Unrecognized strings are returned unchanged.
| Alias | Parameter | Example | Expands to |
|---|---|---|---|
@hourly | minute 0-59 | @hourly 30 | 30 * * * * |
@hourly | none | @hourly | 0 * * * * |
@daily | hour | @daily 9 | 0 9 * * * |
@daily | hour:min | @daily 9:30 | 30 9 * * * |
@daily | none | @daily | 0 0 * * * |
@weekly | day (0=Sun) | @weekly 1 | 0 0 * * 1 |
@weekly | none | @weekly | 0 0 * * 0 |
@monthly | day-of-month | @monthly 15 | 0 0 15 * * |
@monthly | none | @monthly | 0 0 1 * * |
@yearly | month-day | @yearly 3-15 | 0 0 15 3 * |
@yearly | none | @yearly | 0 0 1 1 * |
Returns an error if a parameter is present but not a valid number, or is out of the accepted range for that field.