pollen-rs 0.1.0

Embedded decentralized distributed task scheduler
Documentation

Pollen: Embedded Decentralized Distributed Task Scheduler

Pollen is like SQLite for task scheduling, but with peer-to-peer cluster capabilities.

Quick Start

use pollen::{Pollen, Schedule, Storage};
use std::time::Duration;

#[tokio::main]
async fn main() -> pollen::Result<()> {
    // Single-node mode
    let scheduler = Pollen::builder()
        .storage(Storage::sqlite("./pollen.db"))
        .build()
        .await?;

    // Define a task with cron schedule
    scheduler.define("daily_report")
        .schedule(Schedule::cron("0 9 * * *"))
        .handler(|| async { Ok(()) })
        .register()
        .await?;

    Ok(())
}

Features

  • metrics - Enable Prometheus metrics collection
  • otel - Enable OpenTelemetry integration
  • full - Enable all optional features