Skip to content

(schedules): a Schedules sidebar tab to list, run, enable, create and follow scheduled tasks #792

Open

Description

@jbr-sekoia

Problem

Scheduled tasks have no management surface. A schedule only appears as a schedule-*.md file in the Agent Files sidebar tab, with a ▶ Run now button (public/memory-workfiles-view.js:149). Its runs are listed in the Sessions tab under the schedule's header (#489). Creating one goes through the /create-switchboard-schedule command (schedule-ipc.js, SCHEDULE_CREATOR_TEMPLATE). Nothing shows, across projects, which schedules exist, when they next run, whether they are enabled, or how their last run ended.

Decisions (maintainer, 2026-10-26)

  1. A dedicated sidebar tab, "Schedules", next to Agent Files. It lists the schedules of every registered schedule project (scheduleRegistry, schedule-runner.js), grouped by project.
  2. First version covers all of:
    • List and state: name, project, cron in plain words, next run, last run and its outcome, enabled or not, catch-up.
    • Actions: Run now, enable/disable (setScheduleEnabled), open the file in the editor, delete with confirmation.
    • Creation: a form (name, cron, prompt, allowed tools, and the other frontmatter the runner reads) that writes the schedule-*.md file. It is in addition to /create-switchboard-schedule, which stays.
    • Run history: each schedule's past runs, opening their transcript.
  3. schedule-*.md files leave Agent Files. The Schedules tab is the only place they are listed and acted on. Messages that point to Agent Files for schedules (public/sidebar.js:1485, :1488) point to the Schedules tab instead.

To settle in the spec

  • Where "last run and its outcome" and "run history" come from (catch-up records under schedule-state, pre-seeded transcripts from createScheduleSession, the main log); what is shown when no record exists.
  • Next-run computation from the existing cron parser (cronMatches) and how catch-up and disabled state change it; time zone.
  • Validation and write path of the creation form: same frontmatter parser as the runner, refusal of the binds refusedScheduleBinds refuses, atomic write, refusal for a sandboxed or archived project, a name collision.
  • Deletion vs disabling, and the scheduleFileUnlinked contract.
  • Refresh when a schedule file changes on disk.
  • Interaction with (schedules): run a scheduled task as a background session so it can be joined while it runs #611 (run as a background session), (schedules): Run now reports a run that fails after its shell started #707 (Run now reports a run that fails after its shell started).

Spec only for now: no implementation is scheduled.

Activity

  1. devsuitup commented on Oct 28, 2026

    @devsuitup
    Owner

    After #814 (live schedule-run state shared with A2). #795/#796/#659 are no longer open, so the spec's landing-order note is stale.

  2. devsuitup commented on Oct 28, 2026

    @devsuitup
    Owner

    From the #831 study of upstream's Project View (ee65652 public/schedule-time.js): specify next run as a forward minute walk on the fork's cronMatches (so it can never disagree with firing), the cron in words with preset recognition ("weekdays at 9:00", "(from file)" for raw cron), "in 12 min" / "tomorrow 9:00", and a derived paused reason (isProjectSettingsArchived, enabled: false, sandbox refusal). Last run from cached rows carrying scheduleSlug (#489). Do not take upstream's runner: the fork's (minute recorded before spawn, exclusive-create records, catch-up off for isolated instances) is more robust.

  3. devsuitup commented on Nov 3, 2026

    @devsuitup
    Owner

    Decided by Jean-Baptiste in person, 2026-11-03: Q1: persist each run's result in one file per run (survives a restart, with pruning). Q2: skip missed runs on re-enable (as on unarchive). Q3: rewrite an installed create-switchboard-schedule.md only when it is byte-identical to a shipped template. Q4: refuse exactly what the runner refuses (off Linux, and denied add-dirs on Linux). Q5: the archive dialog and re-enable notice point to the Schedules tab instead of listing schedules. Shared with #793 Q3: exclude schedule-*.md (case-sensitive, as the runner) from Work Files.

  4. devsuitup commented on Nov 3, 2026

    @devsuitup
    Owner

    Decided by Jean-Baptiste in person, 2026-11-03 (follow-ups to spec rev 4): Q2 — skipping missed runs applies everywhere a schedule is re-enabled, including the re-enable offer after unarchive and Undo archive. Q5 — the archive dialog keeps its Disable-schedules checkbox and the re-enable notice its Turn-back-on button, showing a count instead of names, with a link to the Schedules tab.

  5. devsuitup commented on Nov 8, 2026

    @devsuitup
    Owner

    Slice A2 (the Schedules tab) merged in #1035, after A1 in #1021. Follow-up: #1034. Slices B (delete), C (creation form and creator template) and D (run-result records) remain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions