GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: /schedule — run recurring background tasks (cron-like routines) · Issue #41906 · anomalyco/opencode

[FEATURE]: /schedule — run recurring background tasks (cron-like routines) #41906

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
[FEATURE]: /schedule — run recurring background tasks (cron-like routines)#41906
Copy link
Assignees
jlongster

Description

@afonsoft
afonsoft
opened on Aug 12, 2026
Issue body actions

Requested feature

Add a /schedule slash command (inspired by Claude Code's /schedule) to run recurring, background, non-interactive tasks on a timer — e.g. periodic CI/CD sweeps, lint/typecheck runs, or repo reviews.

Why

Today opencode has an internal BackgroundJob service (packages/core/src/background-job.ts, packages/opencode/src/background/job.ts) used for things like session compaction and summary pruning, but there is no user-facing way to schedule a recurring job from the TUI and no cron-like cadence. Automations currently require external orchestrators (n8n, scripts).

Proposed behavior

  • /schedule every 5m <task> or /schedule cron '*/5 * * * *' <task> registers a recurring background routine.
  • Jobs appear in a scheduler list (pause/resume/cancel), run detached from the active session, and surface results via the existing notifications/background job UI.
  • Reuse/extend BackgroundJob.Service (packages/opencode/src/background/job.ts) with a persistence + scheduling layer so jobs survive across sessions.

Benefits

  • In-terminal recurring automation without external tooling.
  • Consistent with the existing background job infrastructure.
Reacted by Mehdi Memar, Paolo D'Elia, HanlinW, amnesia and Keios
Reacted by Keios

Activity

  1. github-actions
    assigned
    jlongster
    on Aug 12, 2026
  2. yanxingyu17 commented on Sep 8, 2026

    @yanxingyu17
    yanxingyu17
    on Sep 8, 2026
    More actions

    We have been prototyping this use case locally and would like to discuss the design before opening a PR.

    Our prototype currently supports:

    • persistent local SQLite-backed automations for once, interval, and five-field cron schedules;
    • timezone-aware scheduling, restart recovery, missed-run policies, retries/backoff, stale-run recovery, and run history;
    • an isolated Agent execution path;
    • a direct, explicitly allowlisted command path for lightweight deterministic jobs, which does not create a Session;
    • CLI management for create/list/show/run/pause/resume/history/remove.

    We validated the prototype with Core automation tests, OpenCode executor/CLI tests, typechecks, migration checks, a Linux x64 build, and a real two-minute command-mode run. The command-mode run produced two Feishu messages 120.683 seconds apart and created no Sessions.

    Before proposing an upstream implementation, we would appreciate guidance on a few architectural questions:

    1. Should this extend the existing BackgroundJob.Service rather than introduce a separate scheduler service?
    2. Should scheduling be owned by serve, web, a separate daemon mode, or an opt-in experimental process?
    3. What ownership/fencing semantics are expected when multiple server processes share the local database?
    4. Would a local persistent scheduler belong in core, or should the first implementation live as an official plugin/companion service?

    We have also reviewed the related scheduling discussions and PRs (#41907, #18001, and #44191). We are happy to adapt the prototype to the preferred direction rather than submit a large, pre-decided PR.

    Reacted by Keios
    Reacted by Keios
  3. danibauti94 commented on Oct 7, 2026

    @danibauti94
    danibauti94
    on Oct 7, 2026
    More actions

    Thanks for proposing this. I would like to add a Web UI / Tasks experience to the scope, similar to Codex Tasks or Claude Code scheduled tasks, so schedules are manageable without relying on the TUI.

    For a self-hosted setup, it would be especially useful if tasks could be created and managed in the Web UI (prompt, agent, workspace, and schedule), then executed server-side by an existing OpenCode Serve instance. The browser could be closed and the task would continue to run as long as that server is available; schedules and run history should survive restarts.

    A useful first-class task lifecycle would include one-shot, interval, and cron schedules; Run now, pause, resume, and delete actions; per-run status, timestamps, output/logs, and failure details; and notifications when a run completes or fails. Each run should reuse the selected workspace's existing OpenCode configuration, agents, MCP servers, skills, and plugins, rather than requiring a separate integration or external orchestrator.

    This would make the existing scheduling/background-job proposal useful for ongoing homelab maintenance, such as periodically checking and updating self-hosted documentation. The TUI can remain a management surface too, but a Web UI is important for users primarily running OpenCode through Serve.

    Reacted by Keios
  4. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Thanks for the detailed request, @afonsoft! You're asking for a /schedule command that runs prompts again and again in the background, on an interval or a cron expression, with schedules that persist and can be paused, resumed or cancelled.

    Maintainers will consider it. Some related work is already in progress:

    • feat(core): scheduled tasks storage and time triggers (experimental) #59401 (merged): stores schedules (once, at a set time, every N minutes, or on a cron) and wakes a session to fire them. It only runs when the experimental experimental.schedules flag is on.
    • feat(core): schedule prompts from agents, /schedule and the experimental API #59457 (open): builds on feat(core): scheduled tasks storage and time triggers (experimental) #59401 and adds a /schedule command, agent tools to create, list, pause, resume and delete schedules, and an experimental API.
    • feat(core): add agent-callable session schedules #52103 (open): an earlier prototype of schedules the agent can create in a session.
    • feat(core): add /loop command #54416 (open): a /loop command that repeats a prompt at a fixed interval.
    • Proposal: background subagents, monitors, cron, worktree isolation #49842: a broader proposal that includes cron and background monitors.

    You can follow those PRs to see how this develops.

    Reacted by Keios
    Reacted by Keios
  5. neriousy commented on Nov 12, 2026

    @neriousy
    neriousy
    on Nov 12, 2026
    Member
    More actions

    Thanks for the suggestion. This isn't something we plan to build, so closing to keep the tracker focused.

  6. neriousy
    closed this as not plannedon Nov 12, 2026
  7. opencodejr
    marked [FEATURE]: having a scheduler tab #63939 as a duplicate of this issue on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jlongster
    jlongster

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.