Method Parse
- Namespace
- Millrace.Scheduling
- Assembly
- Millrace.dll
Parse(string)
Parses a five-field expression: minute, hour, day-of-month, month, day-of-week.
public static CronExpression Parse(string expression)
Parameters
expressionstring
Returns
Remarks
Month and day-of-week accept names as well as numbers, and day-of-week accepts both 0 and 7 for Sunday — the two spellings fold together, so a schedule written either way behaves identically. Everything is UTC; there is no local-time interpretation to get wrong.
Exceptions
- ArgumentException
expressionis empty.- FormatException
It does not have exactly five fields, or a field is out of range for its position.