https://github.com/rogusdev/recurring-tasks
Rust crate to build an app that runs recurring, periodic tasks
https://github.com/rogusdev/recurring-tasks
Last synced: 2 months ago
JSON representation
Rust crate to build an app that runs recurring, periodic tasks
- Host: GitHub
- URL: https://github.com/rogusdev/recurring-tasks
- Owner: rogusdev
- License: mit
- Created: 2025-02-03T19:14:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-08T22:49:54.000Z (about 1 year ago)
- Last Synced: 2025-10-10T15:40:25.268Z (7 months ago)
- Language: Rust
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# recurring-tasks -- Recurring Tasks Manager
Rust crate to build an app that (simply) runs recurring, periodic tasks -- effectively cronjobs, in a dedicated process. And will not run a task that is already (still) running. Supports sub-second periods.
Full, but easily digestible, examples are in the [apps dir](https://github.com/rogusdev/recurring-tasks/tree/main/apps/).
This is designed to be a very focused solution for building an app that has only one job: running various tasks repeatedly, forever. Look at (not mine, just shoutout) [tokio-cron-scheduler crate](https://github.com/mvniekerk/tokio-cron-scheduler) for a much more elaborate approach, using crontab syntax.
Very important: in WSL2, Rust's `Instant` does not properly track seconds for some reason, the virtual clock seems to be just a tiny bit slow relatively to the actual clock, so it will often accumulate 2-3 extra seconds on 20 sec periods... This crate uses Tokio, which is built on Instant, so this drift will be visible in WSL.
Docs.rs [documentation](https://docs.rs/recurring_tasks/latest/recurring_tasks/).