schedule.preview— one-off run of any prompt with no saved row. Streams progress over SSE. Use this while you’re drafting.- Run-now — fires the saved schedule’s exact prompt once, immediately. Use this when the schedule is already saved and you want to confirm it works without waiting for the next tick.
schedule.preview — one-off preview
The streaming MCP tool runs a one-off preview without creating a scheduledRuns row. Args mirror schedule.set minus cronExpression:
Preview tools execute normally. If the agent calls
blocks.setWidgetData, widget data actually updates. Customers iterate by re-running with tweaked prompts; there’s no dry-run flag.How the ephemeral key works
Preview mints a system-flaggedcb_live_* key just for this invocation, uses it to call MCP, then deletes it in a finally block. If the process dies between mint and delete (extremely rare), the orphaned key sits inert with no row pointing at it — acceptable for v1. A janitor cron is deferred.
The audit log records the decrypt with actor: "system:schedulePreview", so preview events are distinguishable from production scheduled runs and from MCP tool calls driven by a human agent.
From the CLI
The CLI wraps preview atchatblocks schedule preview:
· prefix per event. See CLI → Commands.
Run-now — one-off fire of a saved schedule
The list row at/settings/schedule has a small Zap icon button — visible to admins on a Builder workspace when the row’s status is active. Clicking it:
- Calls
scheduledRuns.runNow(a Convex action). - Dispatches
tasks.trigger("scheduled-agent-run", { scheduledRunId })against Trigger.dev. - The standard scheduled-run pipeline runs — same BYOK decrypt, same hidden key, same MCP loop.
- A
scheduledRunHistoryrow appears on the History page within ~10–30 seconds.
schedule.runNow { scheduleId }. Same path via the CLI: chatblocks schedule run <id>.
When to use which
What’s next
Concepts
What a scheduled run actually does, end to end.
CLI → schedule
Terminal commands for preview, list, history, and run.