Skip to content

feat(dashboard): expose cron job execution fields - #53478

Closed
versun wants to merge 1 commit into
NousResearch:mainfrom
versun:feat/dashboard-cron-advanced-fields
Closed

feat(dashboard): expose cron job execution fields#53478
versun wants to merge 1 commit into
NousResearch:mainfrom
versun:feat/dashboard-cron-advanced-fields

Conversation

@versun

@versun versun commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Expands the dashboard cron create/edit flow so it can manage the cron execution fields that already exist in the scheduler core: provider/model/base URL overrides, scripts, no_agent, context_from, enabled toolsets, and workdir.

This keeps the capability in the existing dashboard/API surfaces instead of adding any new model tool surface. The backend adapter now normalizes dashboard payloads into the existing cron.jobs storage shape, validates profile-scoped script and context_from references, and refreshes provider/model drift snapshots when inference routing fields actually change.

Related Issue

No linked issue. I searched existing issues and open/closed PRs for duplicate dashboard cron execution-field work.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • web/src/pages/CronPage.tsx: replaces the narrow cron form with a shared create/edit form that supports advanced execution fields and profile-scoped skills/toolsets/model options.
  • web/src/lib/cron-job.ts: adds cron job form normalization and mutation payload helpers.
  • web/src/lib/schedule.ts: adds schedule parsing so existing interval/once/simple-cron schedules round-trip back into the builder during edit.
  • web/src/lib/api.ts: widens cron job API types and fetches model options for the selected profile.
  • hermes_cli/web_server.py: normalizes dashboard cron create/update payloads, validates scripts under the selected profile's scripts/ directory, and validates context_from job IDs in the selected profile.
  • cron/jobs.py: factors provider/model snapshot creation and refreshes snapshots only when inference-routing axes materially change.
  • tests/hermes_cli/test_web_server_cron_profiles.py, web/src/lib/cron-job.test.ts, web/src/lib/schedule.test.ts: cover dashboard normalization, profile-scoped validation, snapshot refresh behavior, payload helpers, and schedule round-trips.

How to Test

  1. Open the dashboard Cron page, create a job in a non-default profile, and set provider/model/base URL, script, no_agent, context_from, enabled toolsets, and workdir.
  2. Save, reopen the job, and confirm those fields round-trip through the edit form.
  3. Try selecting a script outside the profile scripts/ directory and a context_from ID from another profile; both should return 400 errors.

Validation run locally on macOS 15.7.7:

  • gh search issues --repo NousResearch/hermes-agent "dashboard cron advanced fields profile script no_agent context_from" --limit 20 -> no results
  • gh search prs --repo NousResearch/hermes-agent --state open "dashboard cron advanced fields profile script no_agent context_from" --limit 20 -> no results
  • gh search prs --repo NousResearch/hermes-agent --state closed "dashboard cron advanced fields profile script no_agent context_from" --limit 20 -> no results
  • scripts/run_tests.sh tests/hermes_cli/test_web_server_cron_profiles.py -> 17 passed
  • .venv/bin/pytest tests/hermes_cli/test_web_server_cron_profiles.py -q -> 17 passed
  • npx vitest run web/src/lib/cron-job.test.ts web/src/lib/schedule.test.ts -> 16 passed
  • npm --workspace web run typecheck -- --pretty false -> passed
  • npm --workspace web exec eslint -- src/pages/CronPage.tsx src/lib/api.ts src/lib/schedule.ts src/lib/cron-job.ts src/lib/cron-job.test.ts src/lib/schedule.test.ts -> passed
  • npm --workspace web run lint -> failed on pre-existing files outside this change (LanguageSwitcher.tsx, OAuthProvidersCard.tsx, ConfigPage.tsx, etc.); no lint errors in touched files.
  • scripts/run_tests.sh -> attempted full suite: 1678 files, 34178 tests passed, 49 failed in 626.8s. Failures were outside the new cron coverage and were dominated by local environment/dependency issues (acp/mcp packages not installed, no systemctl/user D-Bus on this macOS shell, /tmp vs /private/tmp path assertions) plus existing unrelated tests such as tests/run_agent/test_run_agent.py hitting the per-file 140s timeout.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15.7.7

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

image

@alt-glitch alt-glitch added type/feature New feature or request comp/dashboard Web dashboard / control panel UI (dashboard/, landing) comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have labels Jun 27, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Comprehensive implementation of the dashboard cron execution-field requests in #24258 and #37353. Supersedes the narrower #48427 (per-job Model field only) in scope — related, not a duplicate. Flagging so a maintainer can decide between this broad form and the narrower #48427.

@teknium1

Copy link
Copy Markdown
Contributor

Merged via #53551. Your feature commit was cherry-picked onto current main with your authorship preserved (rebase-merge). I added a small follow-up that tightens the cron-job form helpers (collapsed three near-identical optional-text helpers into one + reused splitCronList/asString) — behavior-identical, all vitest + backend tests green. Thanks for the well-factored contribution!

@teknium1 teknium1 closed this Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants