OxL Reference

method Schedule.next

First fire time strictly after t; none if the schedule never fires again (e.g. 0 0 30 2 *).

Example:

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

fn main() io {
  let s = cron"30 8 * * *".in(tz"UTC")
  let t = s.next(Time.ofUnixSeconds(0))!
  print("{t.in(tz"UTC").toIso()}")
}
Output
1970-01-01T08:30:00Z
pub(api) fn next(after: Tm) -> Tm?

Complexity. O(1) amortized; searches forward in the calendar.

Since. 1.0.0-beta

Parameters

NameType
afterTm

Returns

Tm?

Effects

none declared (pure unless the body says otherwise)

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

See also