Skip to content

Dashboard / Agent Tasks: manual "Run now" button for scheduled agents #292

Description

@yustme

Feature request

The Scheduled agents section on the dashboard (and the Agent Tasks page) shows each scheduled agent with its cron expression and last-run status, but there is no way to trigger a run manually. You have to wait for the next cron tick.

Use cases

  • Testing a new agent — after creating or editing a scheduled agent, I want to fire it immediately to verify it works, not wait until the next scheduled slot.
  • On-demand re-run — the agent ran but I've since changed the underlying data / config and want to re-run it right now without editing the schedule.
  • Unblocking work — the cron is set to run overnight; I need the result now.

Proposed UX

Add a Run button (▶) next to each agent in the Scheduled agents tile on the dashboard and on the Agent Tasks detail page:

┌─────────────────────────────────────────────────────────────┐
│ Scheduled agents                              [manage →]     │
│─────────────────────────────────────────────────────────────│
│ ▶  Storage Cleanup Advisor   every day 02:00   last: ✓ 8h  │
│ ▶  Schedule Drift Detector   every Mon 06:00   last: ✓ 2d  │
└─────────────────────────────────────────────────────────────┘

Clicking ▶ Run should:

  1. Trigger the agent immediately (same execution path as the cron trigger)
  2. Show a spinner / "running…" state on the button while the run is in progress
  3. On completion, update the "last run" status inline (success / failure + timestamp)

Backend

The serve API already handles agent task execution via SSE for live runs. A manual trigger would just be a POST /agent-tasks/{id}/run (or similar) that enqueues an immediate run outside the cron schedule — the existing run machinery can be reused as-is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions