this post was submitted on 18 Sep 2023
6 points (75.0% liked)
Rust Programming
8176 readers
17 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The clokwerk crate.
@SuddenlyBlowGreen @nothingness I recently needed that, but fuzzy. Like I want a task ran anywhere between 1PM and 2PM. Can this be accomplished with the clockwerk crate?
You could schedule a task at 1 PM, then generate a random number between 0-60 inside that task, wait that many minutes, then launch the actual task.