You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

opencode-scheduler

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-scheduler

OpenCode plugin for scheduling recurring jobs using launchd (Mac) or systemd (Linux)

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
3.8K
26.25%
Maintainers
1
Weekly downloads
 
Created
Source

opencode-scheduler

Run AI agents on a schedule. Set up recurring tasks that execute autonomously—even when you're away.

Schedule a daily job at 9am to search Facebook Marketplace for posters under $100 and send the top 5 deals to my Telegram

This is an OpenCode plugin that uses your OS's native scheduler (launchd on Mac, systemd on Linux) to run prompts reliably—survives reboots, catches up on missed runs.

Install

Add to your opencode.json:

{
  "plugin": ["opencode-scheduler"]
}

Examples

Daily deal hunting:

Schedule a daily job at 9am to search for standing desks under $300

Weekly reports:

Schedule a job every Monday at 8am to summarize my GitHub notifications

Recurring reminders:

Schedule a job every 6 hours to check if my website is up and alert me on Slack if it's down

Commands

CommandExample
Schedule a jobSchedule a daily job at 9am to...
List jobsShow my scheduled jobs
Get versionShow scheduler version
Get jobShow details for standing-desk
Update jobUpdate standing-desk to run at 10am
Run immediatelyRun the standing-desk job now
View logsShow logs for standing-desk
DeleteDelete the standing-desk job

How It Works

  • You describe what you want scheduled in natural language
  • The plugin creates a cron job and installs it in your OS scheduler
  • At the scheduled time, OpenCode runs your prompt autonomously
  • Output is logged to ~/.config/opencode/logs/

You can also trigger a job immediately via run_job—it runs fire-and-forget and appends to the same log file.

Jobs run from the working directory where you created them, picking up your opencode.json and MCP configurations.

Reference

Cron Syntax

Jobs use standard 5-field cron expressions:

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sunday=0)
│ │ │ │ │
* * * * *
ExpressionMeaning
0 9 * * *Daily at 9:00 AM
0 */6 * * *Every 6 hours
30 8 * * 1Mondays at 8:30 AM
0 9,17 * * *At 9 AM and 5 PM daily

Tools

ToolDescription
schedule_jobCreate a new scheduled job
list_jobsList all scheduled jobs
get_versionShow scheduler and opencode versions
get_jobFetch job details and metadata
update_jobUpdate an existing job
delete_jobRemove a scheduled job
run_jobExecute a job immediately (fire-and-forget)
job_logsView logs from a job

Tools accept an optional format: "json" argument to return structured output with success, output, shouldContinue, and data.

Storage

WhatWhere
Job configs~/.config/opencode/jobs/*.json
Logs~/.config/opencode/logs/*.log
launchd plists (Mac)~/Library/LaunchAgents/com.opencode.job.*.plist
systemd units (Linux)~/.config/systemd/user/opencode-job-*.{service,timer}

Working Directory

Jobs run from a specific directory to pick up MCP configs:

Schedule a daily job at 9am from /path/to/project to run my-task

By default, jobs use the directory where you created them.

Attach URL (optional)

If you have an OpenCode backend running via opencode serve or opencode web, you can set attachUrl on a job so runs use that backend:

Update the standing-desk job to use attachUrl http://localhost:4096

Troubleshooting

Jobs not running?

  • Check if installed:

    • Mac: launchctl list | grep opencode
    • Linux: systemctl --user list-timers | grep opencode
  • Check logs: Show logs for my-job

  • Verify the working directory has the right opencode.json with MCP configs

MCP tools not available?

Make sure the job's working directory contains an opencode.json with your MCP server configurations.

License

MIT

Keywords

opencode

FAQs

Package last updated on 11 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts