19 releases (11 breaking)

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

#3 in #ic-cdk

Download history 9044/week @ 2025-02-17 10643/week @ 2025-02-24 10325/week @ 2025-03-03 11522/week @ 2025-03-10 10678/week @ 2025-03-17 10282/week @ 2025-03-24 8522/week @ 2025-03-31 10183/week @ 2025-04-07 8748/week @ 2025-04-14 9999/week @ 2025-04-21 8599/week @ 2025-04-28 8651/week @ 2025-05-05 8366/week @ 2025-05-12 8603/week @ 2025-05-19 7591/week @ 2025-05-26 6112/week @ 2025-06-02

30,842 downloads per month
Used in 23 crates (18 directly)

Apache-2.0

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

~2.3–9.5MB
~95K SLoC