Skip to content

Pause a schedule without editing its file (0.17.0 after #84) - #83

Merged
JOsacky merged 5 commits into
mainfrom
claude/schedule-pause
Nov 12, 2026
Merged

JOsacky merged 5 commits into
mainfrom
claude/schedule-pause

Conversation

@JOsacky

@JOsacky JOsacky commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Version: lands after #84, which takes 0.16.0. This branch is rebased and re-bumped to 0.17.0 once #84 is on main.

Why

Repositories should declare their timers in skillhook.yaml and have that be the source of truth, but a person still needs to switch one off quickly (from Skillhook Cloud) when it misbehaves, without a commit. Today the only off switch is editing the file, so repositories moved their timers into Cloud-owned schedules, which then drift from what the repo declares.

What

  • Scheduler.pause(name, {by, reason, until}) / resume(name). The pause is stored in jobs/.schedules.json (not the skill's file), so repo pulls, hook edits and restarts keep it.
  • While paused nothing fires. The webhook and manual runs still work. Slots that pass count as skipped but are never caught up, and they emit no per-slot events, so a week of a 10-minute timer doesn't produce a thousand. On resume, or when until passes, it fires from the next slot.
  • Surfaces: skillhook schedules pause <name> [--reason] [--until 2h|ISO] / resume (through the running server, or the state file when none runs), POST /schedules/<name>/pause|resume (admin), and cloud commands schedule.pause {name, reason?, until?} / schedule.resume {name} (control class; the next sync carries a fresh snapshot).
  • ScheduleStatus.paused ({at, by?, reason?, until?} or null) in schedules list, GET /health and the cloud snapshot.

Compatibility

Older machines refuse a whole sync response that carries an unknown command type, so the cloud must gate schedule.pause / schedule.resume with COMMAND_SINCE = 0.17.0. That's in the follow-up skillhook-cloud PR, after this publishes.

Checked

pnpm run check: typecheck, 528 tests, build, schema, release metadata. New tests cover the scheduler (quiet skip, no catch-up on resume, until expiry across a restart, refusals, offline state), the admin route, the CLI and a cloud round trip over FakeCloud (pause → snapshot shows it → resume).

🤖 Generated with Claude Code

`skillhook schedules pause|resume`, `POST /schedules/<name>/pause|resume` and the
cloud commands `schedule.pause` / `schedule.resume`. The pause lives in
jobs/.schedules.json, so the repository's skillhook.yaml stays the source of
truth for schedules while a person can switch one off from Skillhook Cloud.
Paused slots are skipped quietly and never caught up; `until` ends a pause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/scheduler.ts Fixed
Comment thread src/scheduler.ts Fixed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JOsacky JOsacky changed the title Pause a schedule without editing its file (0.16.0) Pause a schedule without editing its file (0.17.0 after #84) Nov 10, 2026
@JOsacky
JOsacky enabled auto-merge (squash) November 11, 2026 20:18
JOsacky and others added 3 commits November 11, 2026 15:20
…ude/schedule-pause

# Conflicts:
#	CHANGELOG.md
…ting assignment)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ude/schedule-pause

# Conflicts:
#	CHANGELOG.md
@JOsacky
JOsacky merged commit 8224f3e into main Nov 12, 2026
6 checks passed
@JOsacky
JOsacky deleted the claude/schedule-pause branch November 12, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants