OxL Reference

type Cron

A cron expression (the type is declared in the prelude; literal cron"0 9 * * MON-FRI").

Example:

oxl✓ checked in CI
use std.time { Cron }

fn main() io {
  let c: Cron = cron"*/15 * * * *"
  print(c.expr)
}
Output
*/15 * * * *
pub(api) type Cron = std.core.Cron

Since. 1.0.0-beta

Methods

parse(expr: str) -> Cron | ParseError
Checks expr at run time; prefer the literal cron"…", which is checked at compile time.
in()
Binds the expression to a time zone.

Defined in: std/time/time.oxl:137

See also