method Cron.parse
Checks expr at run time; prefer the literal cron"…", which is checked at compile time.
Example:
use std.time { Cron }
fn main() io {
match Cron.parse("61 * * * *") {
Cron c => print(c.expr)
ParseError _ => print("invalid")
}
}Output
invalid
pub(api) static fn parse(expr: str) -> Cron | ParseErrorSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
expr | str |
Returns
Errors
ParseError@error- `ParseError` when the expression is not valid cron syntax.
Effects
none declared (pure unless the body says otherwise)
Defined in: std/time/time.oxl:2450