What tools can you use to run scheduled tasks in OpenCode?
Compare cron jobs, the opencode-scheduler plugin, and Pipa for OpenCode scheduled tasks. Choose how to schedule work, receive results, and follow up.
Posted by
Related reading
How to code from your phone with OpenCode
Run OpenCode from your phone with its web UI and Tailscale. Set up the connection, add a home-screen shortcut, or send work from Slack through Pipa.
How to automate your daily business brief to Slack
Read your connected tools each morning and send a brief with priorities, blockers, and sources to Slack.
How to monitor competitors with OpenCode and Slack
Tell your agent which competitors to watch, test the brief once, and get cited updates in Slack every morning.
One of the exciting things about using AI is having it do work without you prompting it each time. Scheduled tasks are an easy way to start: you give the agent instructions, choose when it should run, and come back to the result.
There are several ways to schedule tasks in OpenCode, including plugins, your computer's scheduler, and Pipa. Here are some options and when you'd use each.
Why use scheduled tasks?
Scheduled tasks are useful for work you want the agent to return to without starting another conversation each time. A recurring task can check for new work every morning. A one-time task can come back to a deployment in 30 minutes.
At Lunch Pail Labs, I use routines for work like checking for the next ready ticket and taking it through to a pull request, or reviewing our SEO and working on an article. You could also use them to:
- Review repository activity every morning.
- Check whether a deployment finished.
- Prepare a weekly report.
- Check a queue for new work at regular intervals.
You still decide what the agent should do and review what it produces. The schedule handles when it starts. Put the task's instructions, sources, and expected output in the prompt so the agent has what it needs when the time comes.
Compare your options
Cron is your computer's scheduler: it can run a command at a set time. OpenCode's opencode run command accepts a prompt without opening its interactive interface. The opencode-scheduler plugin manages jobs through operating-system schedulers. Pipa adds scheduling to the OpenCode agent you use through chat.
The choice depends on where you want to set up the task, read its result, and continue the work. On a small screen, scroll across the table to compare all three.
| Dimension | Cron job | opencode-scheduler | Pipa |
|---|---|---|---|
| How you set it up | Add a cron entry that calls opencode run. | Add the opencode-scheduler plugin to your OpenCode configuration. | Install the Pipa package and connect it to a chat messaging app like Slack. The current package uses Slack. |
| How you schedule work | Write the command and cron schedule. | Ask OpenCode to create a scheduled job through the plugin's tools. | Ask in chat: “Do this in 30 minutes” or “Every weekday at 9 a.m.” Review the task, time, and destination, then confirm. |
| Recurring tasks | Yes, using cron expressions. | Yes, using cron expressions managed by the plugin. | Yes, including intervals, weekdays, and selected times. |
| One-time tasks | Use a separate tool such as at, or remove the cron entry after it runs. | The documented workflow focuses on recurring jobs. | Yes, at a chosen time or after a delay. |
| Where results appear | Wherever you send the command's output, such as a log file. | In the job's logs, which you can inspect through the plugin. | In your chosen chat channel or thread, currently in Slack. |
| How you follow up | Read the output and return to OpenCode if you need more work. | Read the logs and return to OpenCode. | Reply in the result's thread to continue the OpenCode session that produced it. |
| What must stay running | The computer and cron service must be running when the task is due. | The computer and its operating-system scheduler. An interactive OpenCode session doesn't need to stay open. | The computer must stay awake with the Pipa process running. |
| When you'd use it | You want to manage scheduled commands yourself. | You want to manage recurring jobs inside OpenCode. | You want to schedule work conversationally through a chat messaging app like Slack and follow up there. |
All three need a computer available to do the work. For a setup that runs in the cloud, see Pipa Managed. The plugin's scheduler backend and run controls vary by operating system; check its documentation for your platform.
Choose where you want to manage the work
Use cron if you want to schedule an OpenCode command yourself. Use a scheduler plugin if you want to manage jobs inside OpenCode. Use Pipa if you want to ask for scheduled work in a chat messaging app like Slack and get the result back there.
If Pipa fits how you work, the install guide covers connecting it to Slack. Then follow the scheduling walkthrough to preview and save your first routine.
Start with one task you already give the agent. Try it once, check the result, and then put it on a schedule. If the task needs permission or a decision from you, plan how you'll respond before leaving it to run on its own.