How to schedule OpenCode work to Slack
Schedule timezone-aware OpenCode work with Pipa Local routines and deliver the result to a Slack channel or thread.
Posted by
Related reading
How to install and use OpenCode plugins
Install an OpenCode plugin, check that it loaded, and use Plannotator to review a plan in your browser and send a specific change back to the agent.
How to create agents in OpenCode
Create primary agents and subagents in OpenCode. Add a Markdown file to your project, choose its mode, and run it with a working example.
How to connect an MCP server to OpenCode
Connect an MCP server to OpenCode, check its tools, and run a prompt that uses them. Includes configuration, authentication, and troubleshooting.
Pipa Local can schedule work through the OpenCode agent configured on your computer, then deliver the result to one Slack channel or an existing thread. This is a local scheduler, not a hosted cron service: it runs only while Pipa's Socket Mode process and your computer are running.
Before you schedule work
Set up and start Pipa Local first. The Pipa Local install guide covers installation and Slack credentials; the OpenCode Slack integration page explains the working folder and trusted-channel setup.
Preview a scheduled OpenCode task
Use pipa routine create from the configured computer. Start with a preview so you can inspect the normalized schedule before saving it. Replace the example channel ID with the exact Slack channel where the result should arrive.
pipa routine create \ --prompt "Send the daily brief" \ --timezone America/New_York \ --channel C0123456789 \ --every 1d \ --times 05:00 \ --preview \ --json
Use an IANA timezone such as America/New_York or UTC, not an abbreviation such as EST. Remove --preview after checking the JSON to save the routine.
Choose a schedule and destination
Routines can recur at an interval, run once, or use local times and weekdays. They send to the exact saved channel, or to an existing thread when you include its Slack thread timestamp. If Pipa has a channel allowlist, that destination must be on it.
# Every 30 minutes pipa routine create --prompt "Check the queue" --timezone UTC --channel C0123456789 --every 30m # Once, five minutes from the CLI clock pipa routine create --prompt "Follow up" --timezone UTC --channel C0123456789 --in 5m
Manage a saved routine
List routines to find its ID, then inspect, edit, run, or delete it. A manual run requests one execution without changing the saved schedule.
pipa routine list pipa routine show ROUTINE_ID pipa routine edit ROUTINE_ID --status inactive pipa routine run ROUTINE_ID pipa routine delete ROUTINE_ID
Keep the local scheduler online
Start Pipa with pipa start and keep the machine awake. If Pipa restarts, missed scheduled occurrences are skipped rather than backfilled. Pipa Managed profiles do not execute routines.
Routine work uses the configured working directory, OpenCode tools and permissions, and Pipa's Slack allowlists. Replies to a routine result continue the OpenCode session that produced it.