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 run OpenCode remotely from Slack
Use Pipa Local to send work to OpenCode from Slack while away from the computer where it runs, with clear local-runtime limits.
How to fix an OpenCode Slack agent that is not replying
Troubleshoot a Pipa-controlled OpenCode agent in Slack: check access control, app setup, the local runtime, and same-thread requests.
How to set up Slack allowlists for OpenCode
Control which Slack users and channels can send requests to OpenCode with Pipa. Set user and channel allowlists during pipa init.
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.