18 releases (11 breaking)

new 0.12.0 Apr 22, 2025
0.12.0-alpha.2 Mar 19, 2025
0.12.0-alpha.1 Feb 26, 2025
0.11.0 Nov 5, 2024
0.2.0-beta.0 Feb 3, 2023

#3 in #canister

Download history 5556/week @ 2024-12-31 11234/week @ 2025-01-07 11925/week @ 2025-01-14 12479/week @ 2025-01-21 11022/week @ 2025-01-28 14471/week @ 2025-02-04 10203/week @ 2025-02-11 9740/week @ 2025-02-18 10590/week @ 2025-02-25 10569/week @ 2025-03-04 10920/week @ 2025-03-11 10803/week @ 2025-03-18 10311/week @ 2025-03-25 8480/week @ 2025-04-01 10424/week @ 2025-04-08 7306/week @ 2025-04-15

38,244 downloads per month
Used in 21 crates (17 directly)

Apache-2.0

335KB
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

~3–10MB
~113K SLoC