Skip to content

Cron

[Source]

Compute "next fire" timestamps from Recurrence rules. Zone lookups go through _TzData; no provider parameter.

All returned tuples are POSIX (I64 sec, I64 nsec) shape — feed directly to time.Timer.abs(...).

primitive val Cron

Constructors

create

[Source]

new val create()
: Cron val^

Returns


Public Functions

next

[Source]

Find the next fire instant strictly after after_posix. Dispatches on the Recurrence variant.

fun box next(
  r: Recurrence,
  after_posix: (I64 val , I64 val))
: ((I64 val , I64 val) | NextFireError)

Parameters

Returns


next_weekday

[Source]

One-shot wrapper around WeekdayIter.next_fire. For multi-fire iteration use r.iter_after(after_posix) and call .next_fire() repeatedly.

fun box next_weekday(
  r: WeekdayRecurrence val,
  after_posix: (I64 val , I64 val))
: ((I64 val , I64 val) | NextFireError)

Parameters

Returns


next_monthly

[Source]

One-shot wrapper around MonthlyIter.next_fire. For multi-fire iteration (e.g., projecting 12 months of billing dates) use r.iter_after(after_posix) directly and call .next_fire() repeatedly — the iterator preserves cursor state across calls.

fun box next_monthly(
  r: MonthlyRecurrence val,
  after_posix: (I64 val , I64 val))
: ((I64 val , I64 val) | NextFireError)

Parameters

Returns


next_interval

[Source]

One-shot wrapper around IntervalIter.next_fire. For multi-fire iteration use r.iter_after(after_posix) and call .next_fire() repeatedly.

fun box next_interval(
  r: IntervalRecurrence val,
  after_posix: (I64 val , I64 val))
: ((I64 val , I64 val) | NextFireError)

Parameters

Returns


eq

[Source]

fun box eq(
  that: Cron val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: Cron val)
: Bool val

Parameters

Returns