fn at
Runs body at every fire time of schedule until the task is cancelled (§17.4).
Example:
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
Параметры
| Имя | Тип |
|---|---|
schedule | Schedule |
body | fn() F |
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/time/time.oxl:2577