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

data Schedule

A cron expression bound to a zone (cron"0 9 * * MON-FRI".in(tz"Europe/Moscow")).

Example:

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

fn main() io {
  let s = cron"0 9 * * MON-FRI".in(tz"Europe/Moscow")
  let t = s.next(Time.ofUnixSeconds(1793728800))!
  print("{t.in(tz"Europe/Moscow").toIso()}")
}
Вывод
2026-11-04T09:00:00+03:00[Europe/Moscow]
@derive(Copy, Eq, Hash)
pub(api) data Schedule

Потокобезопасность. an immutable value.

С версии. 1.0.0-beta

Поля

pub(api) cron: Cron

The cron expression.

pub(api) tz: Tz

The zone in which the expression is read.

Методы

next(after: Tm) -> Tm?
First fire time strictly after t; none if the schedule never fires again (e.g.

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

См. также