pi-scheduled-tasks

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

pi-scheduled-tasks

CI Release npm version

A pi package that adds scheduled prompts and prompt-executable slash commands to pi.

It lets pi run reminders, recurring checks, cron-style tasks, and loop-style prompts without needing a polling loop.

Install

From npm

pi install npm:pi-scheduled-tasks

Project-local install:

pi install -l npm:pi-scheduled-tasks

From GitHub

pi install git:github.com/errfld/pi-scheduled-tasks

Quick examples

/loop every 15m check CI failures and summarize changes
/schedule once "tomorrow at 9am" remind me to review open PRs
/schedule cron "0 9 * * 1-5" /daily-standup

What it adds

Commands

/loop 5m check deployment
/loop every 2 hours check CI
/loop check deployment
/loop

/schedule list
/schedule delete <id>
/schedule every 30m check CI
/schedule once "in 45 minutes" check tests
/schedule cron "*/15 * * * *" check status

Model-callable tools

  • scheduled_task_create
  • scheduled_task_list
  • scheduled_task_delete

Features

  • one-shot scheduling with natural language time input
  • interval scheduling like 5m or every 2 hours
  • cron scheduling with standard 5-field expressions
  • loop-style recurring prompts with default prompt resolution
  • queued execution while pi is busy
  • session snapshot persistence and restore
  • custom scheduler status and message rendering

Default /loop prompt resolution

When /loop is used without an explicit prompt, the extension resolves the default prompt in this order:

  1. .pi/loop.md
  2. ~/.pi/agent/loop.md
  3. .claude/loop.md
  4. ~/.claude/loop.md
  5. built-in default prompt

Development

npm install
npm run ci

Useful commands:

npm test
npm run test:watch
npm run check
npm run pack:check

Release

  • push to main to run CI
  • push a tag like v0.0.3 to run the release workflow
  • tagged releases publish to npm using the repository NPM_TOKEN secret
  • published versions are installable with pi install npm:pi-scheduled-tasks

Changelog

See CHANGELOG.md.

License

MIT