Skip to content

docs: fix Cron Jobs button location, run statuses, and document cron API - #597

Closed
HarshRajSinghania wants to merge 3 commits into
Ark0N:masterfrom
HarshRajSinghania:fix/docs-cron-jobs-gaps
Closed

HarshRajSinghania wants to merge 3 commits into
Ark0N:masterfrom
HarshRajSinghania:fix/docs-cron-jobs-gaps

Conversation

@HarshRajSinghania

Copy link
Copy Markdown

Summary

Addresses the documentation gaps in Cron Jobs described in #587.

Changes

  • docs/wiki/Cron-Jobs.md: Corrected the Cron button location (bottom toolbar, under App Settings → Header & Panels → Scheduling) and added the missing session_started and prompt_sent statuses to the run history table, with a note that history tracks session start and prompt delivery, not task success.
  • docs/wiki/HTTP-API.md: Added a Cron Jobs section listing the /api/cron routes, methods, and brief notes on request validation and run statuses.
  • docs/api-reference.md: Added a short Cron Jobs section pointing to the routes and related wiki pages.

Motivation

Issue #587 identified three specific gaps: incorrect button description, incomplete status list, and undocumented cron API routes. The facts were verified against the current code (src/web/public/index.html, src/types/cron.ts, src/web/routes/cron-routes.ts).

Testing

  • Manually reviewed the updated Markdown for correctness and consistency with the source files.
  • Confirmed the button location matches the HTML toolbar markup.
  • Confirmed the status values match CronJobRunStatus in src/types/cron.ts.
  • Confirmed the route list matches src/web/routes/cron-routes.ts.

No runtime tests were run, as this is a documentation-only change.

Fixes #587

Harsh Raj Singhania added 3 commits October 10, 2026 14:09
Closes Ark0N#587.

Correct the button to the bottom toolbar under Scheduling, and document session_started and prompt_sent statuses.
Closes Ark0N#587.

Add the cron job routes, methods, and notes on request shapes and run statuses.
@Ark0N

Ark0N commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Thanks @HarshRajSinghania for picking up #587. This PR fixes the Cron button location and the run-status table on the Cron Jobs wiki page, and adds a cron route table to the HTTP API wiki page.

The button location, the five status names, the route list and the required create fields all match the code. A few things need to change before it can merge:

1. docs/wiki/HTTP-API.md loses five unrelated sections (must fix). Commit 0d28271 replaced the whole file with PLACEHOLDER_TO_BE_REPLACED, and a7ea71d rebuilt it from a copy that stops after the error-code table. The result deletes 81 lines: the note that a 401 is the bare string Unauthorized, and the Authentication, Endpoint map, Long-polling and SSE sections. Home.md:45, Driving-Codeman-From-An-Agent.md:230 and Hooks-And-Integrations.md:96 send readers to this page for exactly that content, and the wiki-sync workflow publishes docs/wiki to the GitHub wiki on every master push. Please restore the file from master (git checkout origin/master -- docs/wiki/HTTP-API.md) and add only the new Cron Jobs section, for example right after the Endpoint map.

2. docs/api-reference.md is not in the diff (must fix). The PR description lists a Cron Jobs section there and #587 names that file, but the PR only touches the two wiki pages, so Fixes #587 would close the issue with that gap open. Please add a short ## Cron Jobs section to docs/api-reference.md (the route table with body and return per route; docs/cron-guide.md:331-341 has it), or drop that line from the description and change Fixes #587 to Refs #587.

3. Run-status meanings, docs/wiki/Cron-Jobs.md:101-105. created still says "The run started and a session was created", which now reads the same as session_started. In src/cron/cron-service.ts:393 a run is written as created before the prompt is resolved and before any session exists; the session appears only at session_started (line 528). The statuses are a sequence (created, then session_started, then prompt_sent), and failed can end the run at any step, including after the session started (lines 652-672). The failed row names two causes; cron-service.ts fails a run at nine more points (session caps, a revoked grant, a failed launch, a failed prompt write, and others). Suggested rows:

Status Meaning
created The run is recorded. The prompt and working directory are being checked; no session exists yet.
session_started The session launched and the prompt is waiting for the CLI to be ready. A run that stays here means the session closed before the prompt went in.
prompt_sent The prompt was delivered. This is the successful end state.
skipped The concurrency policy blocked it. Not counted as a run.
failed The run stopped before the prompt was delivered: the prompt or working directory was rejected, a session limit or permission check refused it, the session failed to launch, or the prompt could not be written.

4. Response shapes, docs/wiki/HTTP-API.md:69-71. "The job object or { job } / { run, activeAgents } as appropriate" leaves the reader guessing which route returns which, and src/web/schemas.ts is plain text on the GitHub wiki. Either add a Returns column to your table (every body sits inside the usual { success: true, data } envelope) or link to section 10 of docs/cron-guide.md with a full GitHub URL, the way the page already links api-reference.md.

5. Unrelated table edits in docs/wiki/Cron-Jobs.md. The Fields, Schedules and Concurrency tables (lines 23-26, 42-47, 81-84) were re-padded so their separator rows no longer match the headers, and lines 46-47 dropped the backticks around HH:MM. Please revert those hunks so the diff carries only the #587 changes.

Once 1 and 2 are in, this is ready to merge. Items 3 to 5 are small: push them with the rest, or leave them and I will apply them at merge time. I will squash the commits on merge, so there is no need to rewrite history.

@Ark0N

Ark0N commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Thanks again @HarshRajSinghania for picking up #587, and sorry for the mixed signal: I'm closing this one as a duplicate of #589.

#589 was opened about four hours before this PR, also with Fixes #587, and already covers all three points of the issue: the Cron button location, the two missing run statuses, and the cron API in both docs/api-reference.md and docs/wiki/HTTP-API.md. It has also been revised for every point of its review. When I wrote above that this PR would be ready to merge once items 1 and 2 were in, I had missed that #589 already did the same work, so please don't spend more time on the fixes I asked for. #589 is the one going in, and it closes #587.

Your verification against index.html, cron.ts and cron-routes.ts was right on the facts, and I'd be glad to see you on another issue. The good first issue label is a good place to look; if you pick one, leave a comment on the issue first so two people don't end up on the same fix again.

@Ark0N Ark0N closed this Oct 10, 2026
Ark0N added a commit that referenced this pull request Oct 10, 2026
…uses

Fixes #587. Supersedes #597, closed as a duplicate.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

Docs: Cron Jobs page names the wrong button location and misses two run statuses; cron API undocumented

2 participants