← 开源
different-ai

opencode-scheduler

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

AI EngineeringGive agent toolsTypeScript
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
504
Star
43
Fork
1
贡献者
创建于 2026-01-04 · 更新于 2026-10-13 · 今日第 18232 名
主要开发者

different-ai/opencode-scheduler 排名第 18,232,有 504 个星标。

同类别比较

different-ai/opencode-scheduler 排名第 18,232,此处有 8 个同类条目;video-db/StreamRAG 排名第 18,246。

同类别比较
名称排名指标
VikashLoomba/copilot-mcp18,202
语言:
TypeScript
星标数:
505
分叉数:
55
简介:
A VSCode extension that lets you find and install Agent Skills and MCP Apps to use with GitHub Copilot, Claude Code, and Codex CLI.
epam/ai-dial-chat18,206
语言:
TypeScript
星标数:
505
分叉数:
63
简介:
A default UI for AI DIAL
halby24/RenderDocMCP18,208
语言:
Python
星标数:
505
分叉数:
115
qodo-ai/open-aware18,214
星标数:
505
分叉数:
45
简介:
Aware - Deep Code Research Agent for Complex Codebase & Knowledge that “Act As Your Agentic Principal Engineer”
video-db/StreamRAG18,246
语言:
Python
星标数:
504
分叉数:
35
简介:
Video Search and Streaming Agent 🕵️‍♂️
zhenbench/z-bench18,248
星标数:
504
分叉数:
41
简介:
Z-Bench 1.0 by 真格基金:一个麻瓜的大语言模型中文测试集。Z-Bench is a LLM prompt dataset for non-technical users, developed by an enthusiastic AI-focused team in Zhenfund.
linxidnju/OpenTag18,261
语言:
JavaScript
星标数:
503
分叉数:
1
简介:
Open-source, channel-native agent gateway for Slack. Route team threads to Claude Code, Codex, OpenCode, Docker, HTTP agents, and custom CLIs with policy, approvals, memory, audit logs, and artifacts.
stanford-scs/jai18,268
语言:
C++
星标数:
503
分叉数:
26
简介:
Jail your AI agent
关键参数与规格
关键参数与规格
参数值
语言TypeScript
类别AI Engineering
子类别Give agent tools
关键词Agent-ready APIs, Automation, DevOps
星标数504
分叉数43
贡献者1
创建日期2026-01-04
更新日期2026-10-13
1 天星标数0
排名18,232
上次排名17,984
排名变化-248
7 天星标排名19,356
上次 7 天星标排名19,336
7 天星标排名变化-20
总星标排名19,249
上次总星标排名19,222
总星标排名变化-27
国家USA
README 摘录

opencode-scheduler Run AI agents on a schedule. This is an OpenCode plugin that uses your OS's native scheduler (launchd on macOS, systemd on Linux, Task Scheduler on Windows), with cron fallback where native backends are unavailable. As of , jobs are scoped by (so different projects don't collide), and scheduled runs are supervised (no overlap + optional timeout). You describe what you want scheduled in natural language 2. The plugin writes a job file (scoped by ) and installs a timer in

your OS scheduler 3. At the scheduled time, the OS scheduler calls a small supervisor script 4. Jobs run from the working directory where you created them, picking up your and MCP configurations. Reliability Guarantees (Scheduled Runs) **No overlap**: if the previous run is still active, the next scheduled tick is skipped. **Non-interactive by default**: scheduled runs force to deny "question" prompts, so jobs don't hang waiting for approvals. **Optional timeout**: set to hard-stop long runs (SIGTERM, then

SIGKILL). Complex cron schedules may be expanded into multiple Windows tasks under . Windows scheduled runs currently do **not** use the supervisor pipeline used on macOS/Linux, so no-overlap and timeout enforcement are not guaranteed by the OS integration itself. Tools accept an optional argument to return structured output with , , , and . Global Cleanup Use to clean scheduler artifacts across all scopes. It always starts in dry-run mode unless you pass . Dry run (safe default): Execute global cleanup of job

definitions + lock files + scheduler units: Also delete logs and run history: The tool reports exactly how many artifacts were removed, grouped by location (jobs, locks, logs, runs, launchd/systemd units). removes both scoped and legacy artifacts. Working Directory Jobs run from a specific directory to pick up MCP configs: By default, jobs use the directory where you created them. Scopes Scopes are derived from the job's (normalized absolute path). This isolates job storage, logs, and OS scheduler unit names per

project. defaults to the **current scope** (your current working directory). Attach URL (optional) If you have an OpenCode backend running via or , you can set on a job so runs use that backend: Project Philosophy This plugin is intentionally a thin wrapper: it schedules via launchd/systemd/schtasks, with cron fallback when native backends are unavailable. Logs are the source of truth for scheduled runs: . Resiliency/reporting roadmap (not implemented): . Built-in Skill Templates To install the built-in skill

into your project (no copy/paste), open OpenCode in your repo and run: This calls the plugin’s tool and writes . ) Then add at the top of scheduled job prompts. (Manual option: use to fetch and copy it into . Check if installed: Mac: Linux: Windows: 2. Verify the working directory has the right with MCP configs **MCP tools not available? ** Make sure the job's working directory contains an with your MCP server configurations.

常见问题

记录了多少星标和分叉?

different-ai/opencode-scheduler 有 504 个星标和 43 个分叉。

仓库排名是多少?

different-ai/opencode-scheduler 排名第 18,232。

记录的语言和类别是什么?

different-ai/opencode-scheduler 有 504 个星标,语言为 TypeScript,类别为 AI Engineering。

哪个仓库排名最接近?

different-ai/opencode-scheduler 与 video-db/StreamRAG 比较,后者排名第 18,246,有 504 个星标。

README

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 macOS, systemd on Linux, Task Scheduler on Windows), with cron fallback where native backends are unavailable.

As of v1.2.0, jobs are scoped by workdir (so different projects don't collide), and scheduled runs are supervised (no overlap + optional timeout).

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

Command Example
Schedule a job Schedule a daily job at 9am to...
List jobs Show my scheduled jobs
Get version Show scheduler version
Install skill template Install the scheduled job best practices skill
Get job Show details for standing-desk
Update job Update standing-desk to run at 10am
Run immediately Run the standing-desk job now
View logs Show logs for standing-desk
Delete Delete the standing-desk job
Global cleanup (dry run) Run scheduler global cleanup

How It Works

  1. You describe what you want scheduled in natural language
  2. The plugin writes a job file (scoped by workdir) and installs a timer in your OS scheduler
  3. At the scheduled time, the OS scheduler calls a small supervisor script
  4. The supervisor runs the job, appends logs, and updates job metadata

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.

Reliability Guarantees (Scheduled Runs)

  • No overlap: if the previous run is still active, the next scheduled tick is skipped.
  • Non-interactive by default: scheduled runs force OPENCODE_PERMISSION to deny "question" prompts, so jobs don't hang waiting for approvals.
  • Optional timeout: set timeoutSeconds to hard-stop long runs (SIGTERM, then SIGKILL).

Platform Support

Platform Scheduler backend Notes
macOS launchd Full support (supervised scheduled runs)
Linux (systemd available) systemd --user Full support (supervised scheduled runs)
Linux / POSIX (no systemd) cron (crontab) Fallback backend (no missed-run catch-up)
Windows schtasks (Task Scheduler) Supported with cron subset mapping (see limits below)

Windows Task Scheduler limits:

  • Cron expressions that use unsupported combinations (for example, month + weekday constraints, or month-only without explicit day-of-month) return a clear error with guidance.
  • Complex cron schedules may be expanded into multiple Windows tasks under \\OpenCode\\opencode-job-....
  • Windows scheduled runs currently do not use the supervisor pipeline used on macOS/Linux, so no-overlap and timeout enforcement are not guaranteed by the OS integration itself.

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)
│ │ │ │ │
* * * * *
Expression Meaning
0 9 * * * Daily at 9:00 AM
0 */6 * * * Every 6 hours
30 8 * * 1 Mondays at 8:30 AM
0 9,17 * * * At 9 AM and 5 PM daily

Tools

Tool Description
schedule_job Create a new scheduled job
list_jobs List all scheduled jobs
get_version Show scheduler and opencode versions
get_skill Get built-in skill templates (best practices)
install_skill Install a built-in skill into your repo
get_job Fetch job details and metadata
update_job Update an existing job
delete_job Remove a scheduled job
cleanup_global Remove scheduler artifacts across all scopes (dry-run by default)
run_job Execute a job immediately (fire-and-forget)
job_logs View the latest logs from a job

schedule_job and update_job accept an optional timeoutSeconds (integer seconds). Use 0 (or omit) to disable.

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

Global Cleanup

Use cleanup_global to clean scheduler artifacts across all scopes. It always starts in dry-run mode unless you pass confirm: true.

  • Dry run (safe default):
{ "confirm": false }
  • Execute global cleanup of job definitions + lock files + scheduler units:
{ "confirm": true }
  • Also delete logs and run history:
{ "confirm": true, "includeHistory": true }

The tool reports exactly how many artifacts were removed, grouped by location (jobs, locks, logs, runs, launchd/systemd units).

Storage

What Where
Job configs (scoped) ~/.config/opencode/scheduler/scopes//jobs/*.json
Run records (scoped) ~/.config/opencode/scheduler/scopes//runs/*.jsonl
Locks (scoped) ~/.config/opencode/scheduler/scopes//locks/*.json
Logs (scoped) ~/.config/opencode/logs/scheduler//*.log
Supervisor script ~/.config/opencode/scheduler/supervisor.pl
launchd plists (Mac) ~/Library/LaunchAgents/com.opencode.job..*.plist
systemd units (Linux) ~/.config/systemd/user/opencode-job--*.{service,timer}
Task Scheduler entries (Windows) \\OpenCode\\opencode-job--*

Legacy note: older versions stored jobs in ~/.config/opencode/jobs/*.json and used unscoped unit names. delete_job removes both scoped and legacy artifacts.

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.

Scopes

Scopes are derived from the job's workdir (normalized absolute path). This isolates job storage, logs, and OS scheduler unit names per project.

  • list_jobs defaults to the current scope (your current working directory).
  • Use allScopes: true to list jobs across all scopes.
  • Use includeLegacy: true to include pre-v1.2.0 jobs stored in ~/.config/opencode/jobs.

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

Project Philosophy

  • This plugin is intentionally a thin wrapper: it schedules opencode run via launchd/systemd/schtasks, with cron fallback when native backends are unavailable.
  • Logs are the source of truth for scheduled runs: ~/.config/opencode/logs/*.log.
  • Resiliency/reporting roadmap (not implemented): PRD-resilient-execution.md.

Built-in Skill Templates

To install the built-in skill into your project (no copy/paste), open OpenCode in your repo and run:

Install the scheduled job best practices skill

This calls the plugin’s install_skill tool and writes .opencode/skill/scheduled-job-best-practices/SKILL.md.

(If you prefer, you can also say: Get skill from opencode-scheduler and add it to my skills.)

Then add @scheduled-job-best-practices at the top of scheduled job prompts.

(Manual option: use get_skill to fetch scheduled-job-best-practices and copy it into .opencode/skill/scheduled-job-best-practices/SKILL.md.)

Troubleshooting

Jobs not running?

  1. Check if installed:

    • Mac: launchctl list | grep opencode
    • Linux: systemctl --user list-timers | grep opencode
    • Windows: schtasks /Query /TN "\\OpenCode\\opencode-job-*"
  2. Check logs: Show logs for my-job

  3. 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

排名相邻
同类项目