Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. delay-timer

delay-timer

Apache-2.0RustV0.11.5

A Rust-based task scheduler for managing delayed and periodic tasks with dynamic control, supporting both synchronous and asynchronous execution.

GitHubGitHub
331 stars26 forks0 contributors

What is delay-timer?

delay-timer is a Rust task scheduler built on a time wheel algorithm, designed to manage timed and periodic tasks. It provides a flexible alternative to cron-like schedulers by supporting both synchronous and asynchronous task execution, along with dynamic runtime task management.

Target Audience

Rust developers building applications that require scheduled, delayed, or recurring tasks, such as background job processors, periodic data backups, or timed automation scripts.

Value Proposition

Developers choose delay-timer for its dynamic task management, allowing tasks to be added, canceled, or removed at runtime without restarting the scheduler, and its flexibility in supporting both async/await and synchronous execution with optional runtimes like smol or tokio.

Overview

Time-manager of delayed tasks. Like crontab, but synchronous asynchronous tasks are possible scheduling, and dynamic add/cancel/remove is supported.

Use Cases

Best For

  • Scheduling periodic tasks with cron-like expressions in Rust applications
  • Managing dynamic task lifecycles where tasks need to be added or canceled at runtime
  • Running asynchronous background jobs with controlled parallelism
  • Executing tasks at specific dates and times, such as weekly backups
  • Building task schedulers that require fine-grained control over individual task instances
  • Integrating timed task management with async runtimes like tokio or smol

Not Ideal For

  • Projects requiring distributed task scheduling across multiple servers or nodes
  • Real-time systems where task execution timing must have nanosecond-level precision
  • Applications that need automatic task state persistence and recovery after crashes or restarts
  • Teams looking for out-of-the-box monitoring dashboards or extensive built-in logging features

Pros & Cons

Pros

Dynamic Task Management

Tasks can be added, canceled, or removed at runtime without restarting the scheduler, as shown with methods like `insert_task`, `remove_task`, and `cancel_with_wait` in the examples.

Flexible Async/Sync Support

Supports both asynchronous and synchronous task execution, with optional integration for smol or tokio runtimes, allowing developers to choose concurrency models based on their application needs.

Cron-like Scheduling

Enables scheduling using cron expressions (e.g., '@secondly') or specific dates and times, providing familiar and powerful timing controls beyond simple intervals.

Controlled Parallelism

Allows configuration of the maximum number of parallel tasks, preventing resource exhaustion and improving application stability, as demonstrated with `set_maximum_parallel_runnable_num`.

Cons

Incomplete Cleanup on Drop

The README's To Do List indicates that automatic termination of threads and tasks when the DelayTimer is dropped is not yet implemented, which could lead to resource leaks in long-running applications.

No Built-in Persistence

Task states are not persisted across application restarts, requiring manual re-adding of tasks after shutdowns or failures, which adds complexity for stateful scheduling needs.

Limited Monitoring Tools

Built-in features for monitoring task execution, such as detailed logs or metrics, are minimal, with 'report-for-server' listed as a future enhancement in the README.

Frequently Asked Questions

Quick Stats

Stars331
Forks26
Contributors0
Open Issues7
Last commit2 years ago
CreatedSince 2020

Tags

#task-scheduler#periodic-tasks#async-await#schedule#tokio#runtime-management#concurrency#rust#scheduling#crontab#cron

Built With

S
Smol
R
Rust
T
Tokio

Included in

Rust56.6k
Auto-fetched 1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub