Steps
1
Put a SCHEDULE_TRIGGER at the start
Set exactly one of
intervalMs and cron. The first tick comes after one interval, or at the next cron time. Each tick is a message {"tick": 1, "firedAt": "..."}; tick counts from 1.0 */5 * * * * is every five minutes, 0 0 9 * * MON-FRI is 09:00 on weekdays. Both set, neither set, a non-positive interval and a cron with no future date are refused at validation.2
Write the workflow
This probes a URL every minute and sends a notification when it fails. Save as
uptime.json:uptime.json
3
Apply it and start it once
Idempotency-Key makes a retried start return the first run.4
Stop it when you are done
A run with a schedule stays open until you stop it, the trigger reaches CLI:
maxRuns, or the server stops. The default DRAIN mode stops the trigger and lets in-flight work finish:yukta-cli workflow stop uptime-watch probe.Verify it worked
After a minute and a bit, the run is stillRUNNING and the ok terminal has received a message with tick 1; a minute later, tick 2. Read it with the results stream or the run log.
Variations
- A schedule that survives restarts. The schedule position is not stored: after a restart nothing starts the workflow, missed ticks are not replayed, and a resumed run starts its schedule again from the beginning. Run the clock outside Yukta instead: start a run per tick with
POST /api/workflow/start,yukta-cli workflow start <session> <workflow> --payload '{...}'or the MCP toolstart_workflow, from a workflow that begins withAPI_TRIGGER. AnIdempotency-Keysuch asnightly-2026-10-15stops a retried start from running twice. - Ticks arrive faster than the work. All ticks belong to one run and an interval tick that arrives while the previous start is still running is dropped and logged; keep the interval longer than the work, or put
engine.edgeBufferon the slow node (Delivery and back-pressure). - Limits on concurrent runs. A schedule holds one slot all the time: Tune capacity and limits.
Related
- Trigger reference for
SCHEDULE_TRIGGER’s every option. - Control a run to pause or stop an open run.
- Time limits for the idle timeout.