16 releases (breaking)

0.12.0-alpha.1 Feb 26, 2025
0.11.0 Nov 5, 2024
0.10.0 Aug 27, 2024
0.9.0 Jul 1, 2024
0.2.0-beta.0 Feb 3, 2023

#888 in Magic Beans

Download history 10739/week @ 2024-11-17 10514/week @ 2024-11-24 12366/week @ 2024-12-01 12945/week @ 2024-12-08 9529/week @ 2024-12-15 2275/week @ 2024-12-22 3351/week @ 2024-12-29 11562/week @ 2025-01-05 11802/week @ 2025-01-12 13020/week @ 2025-01-19 10453/week @ 2025-01-26 13706/week @ 2025-02-02 12004/week @ 2025-02-09 8730/week @ 2025-02-16 11170/week @ 2025-02-23 9953/week @ 2025-03-02

42,689 downloads per month
Used in 14 crates (13 directly)

Apache-2.0

290KB
4.5K SLoC

Rust CDK Timers Library

Documentation Crates.io License Downloads CI

This crate provides a library to schedule multiple and periodic tasks on the Internet Computer.

Example

In Cargo.toml:

[dependencies]
ic-cdk-timers = "0.9.0"

To schedule a one-shot task to be executed 1s later:

ic_cdk_timers::set_timer(Duration::from_secs(1), || ic_cdk::println!("Hello from the future!"));

References

  1. Internet Computer Developer Guide: Periodic Tasks and Timers
  2. Example: Periodic Tasks and Timers (compares timers and heartbeats).

Dependencies

~6–15MB
~161K SLoC