Skip to main content

zeno-scheduler

Proactive-trigger scheduler for Zeno.

Fires agent turns autonomously — the assistant doesn't have to wait for the user to send a message. Supports one-shot reminders, periodic heartbeats, and cron-style recurring schedules. Triggers are persisted to SQLite so they survive process restarts. Built-in @tools let the agent itself schedule and cancel its own reminders.

Install

uv add 'zeno-framework[scheduler]'
# or, without the AI package:
uv add zeno-scheduler

Features

  • One-shot triggers (schedule_once) — fire at a specific datetime or after a timedelta
  • Heartbeat triggers (schedule_heartbeat) — fire every N seconds
  • Cron triggers (schedule_cron) — standard 5-field cron expression with timezone support
  • Built-in tools so the agent can self-schedule from natural-language reminders: schedule_once, schedule_heartbeat, schedule_cron, list_triggers, cancel_trigger, cancel_trigger_by_name
  • (user_id, name) upsert semantics — re-running a seed call with the same name updates the existing row instead of duplicating it
  • Missed-fire policies (OnMissed.SKIP / RUN_ONCE / RUN_ALL) for triggers that lapse while the process was down

Minimal usage

import asyncio
from datetime import timedelta
from pathlib import Path

from zeno.agent import Agent
from zeno.app import ZenoApp
from zeno.channels.cli import CliChannel
from zeno.scheduler import Scheduler, SqliteScheduleStore
from zeno.scheduler.tools import schedule_once, list_triggers, cancel_trigger
from zeno.testing import FakeProvider

async def main() -> None:
    store = SqliteScheduleStore(Path("./scheduler.db"))
    scheduler = Scheduler(store)

    # Pre-seed a one-shot reminder. The agent could also call this via
    # the `schedule_once` tool at runtime (which accepts string deltas
    # like "30m" — handy when the model produces them).
    await scheduler.schedule_once(
        user_id="local",
        thread_key=None,
        channel="cli",
        prompt="Reminder: stand up and stretch.",
        delta=timedelta(minutes=30),
        name="stretch-reminder",
    )

    app = ZenoApp(
        agent=Agent(
            name="root",
            instructions="You are a proactive assistant. Schedule reminders when asked.",
            tools=[schedule_once, list_triggers, cancel_trigger],
        ),
        channels=[CliChannel()],
        provider=FakeProvider(),
        scheduler=scheduler,  # ← wires the scheduler into ZenoApp's lifecycle
    )
    await app.run()

asyncio.run(main())

ZenoApp starts and stops the scheduler alongside its other tasks. When a trigger fires, the scheduler calls channel.inbound_put(...) on the matching channel, which delivers the prompt as a synthetic inbound message — the agent processes it through the same turn path as a real user message.

Testing

uv run pytest packages/zeno-scheduler

Tests use an in-memory ScheduleStore and a virtual clock — no real sleep or filesystem I/O.

Caveats

Single-process only. The scheduler runs an in-process loop that scans SqliteScheduleStore for due triggers and fires them locally. There is no leader election or distributed lock. Running two ZenoApp instances against the same SQLite database will cause double firing — both loops will see the same row as due and call channel.inbound_put(...) independently. For now: run exactly one process per scheduler.db. A multi-process / leader-elected backend (e.g. Postgres SELECT … FOR UPDATE SKIP LOCKED) is on the roadmap.

Part of the Zeno framework. See apps/zeno-example-scheduler for a runnable end-to-end reference wiring.

Metadata

Release files for zeno-scheduler 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zeno-scheduler 1.1.0
File Size Uploaded
zeno_scheduler-1.1.0.tar.gz 40.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zeno-scheduler 1.1.0
File Interpreter ABI Platform
zeno_scheduler-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 69.1 kB

Release files / zeno_scheduler-1.1.0.tar.gz

Download URL zeno_scheduler-1.1.0.tar.gz
Size 40.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a769701f9bdf20e14544a86bc083c5c2c13e013f7c447984c975fcc302366acf
BLAKE2b-256 checksum
How to use checksums
65dbdec5ad009ac1fe737e97aa6272597fa1e1db183eff1f811121f4ef6fc2b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release files / zeno_scheduler-1.1.0-py3-none-any.whl

Download URL zeno_scheduler-1.1.0-py3-none-any.whl
Size 29.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddbbd8394af8e6dba80fe097e32b91ddc7db73dd99c95ff386f073715b2f5d98
BLAKE2b-256 checksum
How to use checksums
0d288648e2a5cf78837d08d55fb24ed51bc108d924acc4b6412ae36ef74a485f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page