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

fn at

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

Example:

oxl✓ проверяется в 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

Потокобезопасность. runs in the calling task until it is cancelled or the schedule has no more fire times.

С версии. 1.0.0-beta

Параметры

ИмяТип
scheduleSchedule
bodyfn() F

Эффекты

не объявлены (чистая, пока тело не говорит иное)

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

См. также