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, FThread safety. runs in the calling task until it is cancelled or the schedule has no more fire times.
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
schedule | Schedule |
body | fn() F |
Effects
none declared (pure unless the body says otherwise)
Defined in: std/time/time.oxl:2577