OxL Reference

fn at

Runs body at every fire time of schedule until the task is cancelled (§17.4).

Example:

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

fn nightly() io, time {
  at(cron"0 3 * * *".in(tz"UTC")) {
    print("nightly job")
  }
}
pub(api) fn at<effect F>(schedule: Schedule, body: fn() F) time, F

Thread safety. runs in the calling task until it is cancelled or the schedule has no more fire times.

Since. 1.0.0-beta

Parameters

NameType
scheduleSchedule
bodyfn() F

Effects

none declared (pure unless the body says otherwise)

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

See also