Skip to content

feat: schedules admin page + per-schedule timeout (#986 slice C) - #998

Merged
milkway merged 1 commit into
mainfrom
feat/issue-986-schedules-ui
Jul 13, 2026
Merged

feat: schedules admin page + per-schedule timeout (#986 slice C)#998
milkway merged 1 commit into
mainfrom
feat/issue-986-schedules-ui

Conversation

@milkway

@milkway milkway commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Closes #986 (slice C of 3 — closes the epic; A = #996, B = #997)

What

  • /admin/schedules (Admin-only; nav after Appearance): create form (containerized specs only — External never offered; cron validated server-side via croner; argv one-per-line → cmd_json; timeout in minutes, capped against overflow), schedule table with the computed next occurrence, enable/disable toggle, delete behind data-confirm, and the last-20 run history (status badges, exit code, duration, log tail in <details>).
  • Per-schedule timeout end to end: SpawnRequest.job_timeout_secs (consumed only by run_job; default stays the 1 h cap) wired from the timeout_secs column slice B shipped.
  • db::schedules::recent_runs (join for spec ids, both dialects, tested on sqlite + real pg).
  • Docs: admin.md § Schedules (ETL semantics, leader-only, job-failed webhook); 32 i18n keys ×4 locales.

Verification

  • Full gate: 660 tests, 0 failed (+11), clippy -D warnings clean, i18n parity.
  • New integration tests: valid create persists (argv parsed, 90 min → 5400 s) and renders; invalid cron / unknown spec / External spec rejected with specific flashes and nothing persisted; toggle round-trip; delete; Editor gets 403 on GET and POST.
  • Implemented by a subagent from a full spec; security surface (5× RequireAdmin, confirm on delete, admin-only section fall-through) re-verified by hand.

🤖 Generated with Claude Code

Slice C closes the scheduled-jobs epic (#986). New Admin-only
/admin/schedules page (nav: after Appearance, ti-clock): create a
schedule (containerized specs only — the select never offers an
External; cron validated server-side via croner; one argv line per
row → cmd_json; timeout in minutes with an anti-overflow cap),
enable/disable toggle, delete behind the confirm dialog, the computed
NEXT occurrence per schedule, and the last-20 run history with status
badges and the log tail in a <details>. 32 i18n keys ×4.

Per-schedule timeout wired end to end: SpawnRequest.job_timeout_secs
(builder, consumed only by run_job — default stays the 1 h cap) ←
schedules.timeout_secs (the column slice B shipped).

db: recent_runs join for the history. Docs: admin.md § Schedules
(semantics: no fire-on-create, downtime collapses, leader-only in HA,
job-failed webhook). Route tests: create/validate/toggle/delete +
Editor gets 403.

Closes #986

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@milkway
milkway merged commit c5db20e into main Jul 13, 2026
@milkway
milkway deleted the feat/issue-986-schedules-ui branch July 13, 2026 17:39
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.

Módulo de execuções agendadas (cronjobs): rodar um spec containerizado em horário programado (ETL/relatórios)

1 participant