npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-ate-scheduler

v1.0.2

Published

Timer and recurring task extension for pi-coding-agent

Downloads

435

Readme

📖 pi-atelier 实战指南 — 从零教会你使用 pi-atelier 扩展生态,包含完整示例和最佳实践。

English | 程序中文文档

pi-scheduler

源码仓库 | npm

Timer and recurring task extension for pi — scheduled messages, interval-based prompts, and task automation.

Why You Need It

Sometimes you need your AI agent to do things on a schedule — remind you to commit every 30 minutes, check build status periodically, or send a notification at a specific time. Without pi-scheduler, you'd have to manually trigger these actions yourself.

pi-scheduler adds time-based automation to pi:

  • One-time reminders — "Remind me in 10 minutes to check the tests"
  • Recurring tasks — "Every 5 minutes, check if the server is responding"
  • Timed prompts — Inject messages into the agent's context at scheduled times
  • Task management — List, cancel, and monitor active timers

How It Works

User/Agent: "Remind me in 10 min to check tests"
        │
        ▼
schedule(action: "create", interval_ms: 600000, prompt: "Check tests")
        │
        ▼
TimerEngine registers timer
        │
        ├── one-shot (recurring=false): fires once after interval
        └── loop (recurring=true): fires every interval
        │
        ▼ when timer fires
Prompt injected into agent context
        │
        ▼
Agent processes the prompt like a user message

Installation

pi install git:github.com/catlain/pi-scheduler

Commands

| Command | Description | |---------|-------------| | /loop | List active recurring tasks | | /remind | List active one-time reminders | | /tasks | List all active tasks (reminders + loops) |

Tool: schedule

Create, list, and cancel scheduled tasks:

| Action | Description | |--------|-------------| | create | Create a new scheduled task (one-time or recurring) | | list | List all active tasks | | cancel | Cancel a task by ID |

Parameters

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | action | string | ✅ | create, list, or cancel | | id | string | for cancel | Task ID to cancel | | prompt | string | for create | Message to inject when timer fires | | interval_ms | number | for create | Interval in milliseconds | | recurring | boolean | for create | true = repeating, false = one-shot (default) |

Examples

One-time reminder

schedule(action: "create", prompt: "Check if tests pass", interval_ms: 600000)
// Fires once after 10 minutes

Recurring task

schedule(action: "create", prompt: "Commit current changes", interval_ms: 1800000, recurring: true)
// Fires every 30 minutes

List active tasks

schedule(action: "list")

Cancel a task

schedule(action: "cancel", id: "task-abc123")

Use Cases

| Scenario | Config | |----------|--------| | Commit discipline | Recurring every 30 min: "Commit current changes" | | Monitoring | Recurring every 5 min: "Check server status" | | Time-boxing | One-shot after 60 min: "You've spent over an hour on this task" | | Build check | One-shot after 2 min: "Check if CI build passed" | | Periodic review | Recurring every 20 min: "Review what you've done so far" |

Best Practices

✅ Recommended

  • Use human-readable prompts — they're injected directly into the agent's context
  • Set reasonable intervals (≥ 1 minute) — too frequent will flood the context
  • Use /tasks to review active tasks before creating new ones
  • Cancel tasks you no longer need to free up context

❌ Not Recommended

  • Don't set intervals < 30 seconds — the agent can't respond that fast
  • Don't create many recurring tasks simultaneously — context pollution
  • Don't use for critical scheduling — timers are lost when pi restarts

Limitations

| Limitation | Detail | |------------|--------| | No persistence | Timers are in-memory only, lost on restart | | No cron syntax | Intervals only (milliseconds), no cron expressions | | Context injection | Prompt occupies context space when it fires | | No deduplication | Creating identical tasks results in duplicates |

Architecture

pi-scheduler/
├── index.ts          # Entry: register schedule tool + slash commands
├── timer-engine.ts   # Core timer management (create/list/cancel)
├── parser.ts         # Natural language time parsing ("10 min" → ms)
├── types.ts          # Timer type definitions
├── tests/            # Unit tests
└── package.json

Dependencies:

  • @earendil-works/pi-coding-agent — ExtensionAPI (peer)

License

MIT