---
slug: "pi-scheduled-tasks"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/errfld/pi-scheduled-tasks@main/README.md"
repo: "https://github.com/errfld/pi-scheduled-tasks"
source_file: "README.md"
branch: "main"
---
# pi-scheduled-tasks

[![CI](https://github.com/errfld/pi-scheduled-tasks/actions/workflows/ci.yml/badge.svg)](https://github.com/errfld/pi-scheduled-tasks/actions/workflows/ci.yml)
[![Release](https://github.com/errfld/pi-scheduled-tasks/actions/workflows/release.yml/badge.svg)](https://github.com/errfld/pi-scheduled-tasks/actions/workflows/release.yml)
[![npm version](https://img.shields.io/npm/v/pi-scheduled-tasks.svg)](https://www.npmjs.com/package/pi-scheduled-tasks)

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

```bash
pi install npm:pi-scheduled-tasks
```

Project-local install:

```bash
pi install -l npm:pi-scheduled-tasks
```

### From GitHub

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

## Quick examples

```text
/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

```text
/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

```bash
npm install
npm run ci
```

Useful commands:

```bash
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](https://github.com/errfld/pi-scheduled-tasks/blob/HEAD/CHANGELOG.md).

## License

MIT
