OxL Справочник OxL
РусскийEnglish

type Cron

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

Example:

oxl✓ проверяется в CI
use std.time { Cron }

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

С версии. 1.0.0-beta

Методы

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.

Определено в: std/time/time.oxl:137

См. также