@e9n/pi-cron
Cron scheduler extension for pi — schedule recurring prompts as isolated subprocesses
Package details
Install @e9n/pi-cron from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@e9n/pi-cron- Package
@e9n/pi-cron- Version
0.2.1- Published
- Apr 26, 2026
- Downloads
- 203/mo · 160/wk
- Author
- e9n
- License
- MIT
- Types
- extension
- Size
- 71.8 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@e9n/pi-cron
Cron scheduler for pi — schedule recurring prompts that run as isolated pi -p subprocesses.
Features
- No database — jobs stored in
~/.pi/agent/pi-cron.tab(plain text, hand-edit friendly) - Live reload — file watcher reloads jobs automatically when the tab changes
- Disabled by default — scheduler doesn't run unless explicitly started
- Lock file — only one pi instance can run the scheduler at a time (
~/.pi/agent/pi-cron.lock) - Event API —
cron:add,cron:list,cron:job_complete, etc. for inter-extension use
Enabling the scheduler
The scheduler is off by default. Start it with:
pi --cron # CLI flag — enable on startup
Or toggle at runtime:
/cron on # Start scheduler
/cron off # Stop scheduler
/cron # Show status
Or set "pi-cron": { "autostart": true } in your settings file to start automatically every session.
Tool: cron
| Action | Required params | Description |
|---|---|---|
list |
— | Show all jobs with status |
add |
name, schedule, prompt |
Add a new job (schedule is a standard cron expression) |
update |
name |
Update schedule, prompt, or channel for an existing job |
remove |
name |
Remove a job |
enable |
name |
Re-enable a disabled job |
disable |
name |
Disable a job without removing it |
run |
name |
Trigger a job immediately (scheduler must be active) |
Commands
| Command | Description |
|---|---|
/cron on |
Start the scheduler |
/cron off |
Stop the scheduler |
/cron |
Show status (active, PID, job count) |
Install
pi install npm:@e9n/pi-cron
License
MIT