Workflow definition

Trigger · cron

trigger: { type: "cron", cron: "0 8 * * 1" }

It runs on a schedule, with nobody there. The trigger that makes the approval rule matter most.

a cron expressionnobody watchinginput comes from the schedule
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

trigger: { type: "cron", cron: "0 8 * * 1" }    // Mondays at 08:00
trigger = {"type": "cron", "cron": "0 8 * * 1"}    # Mondays at 08:00

What input holds

Whatever the schedule provides — there is no caller to pass anything. A scheduled chain that needs a date computes it from the moment it runs, rather than reading it from input.

This is where the human step earns its keep

A scheduled run can send, publish or change DNS only after an approval

The chain runs, reaches the human step, and stops as waiting — indefinitely. Somebody approves it, and the rest proceeds. A workflow that would act on the world without that is refused when it is saved.

A waiting run is an inbox

const waiting = (await workflow.runs()).filter((r) => r.data.status === "waiting");

for (const run of waiting) {
  const step = run.data.steps.find((s) => s.status === "waiting");
  console.log(run.id, step.config?.title);
}
waiting = [r for r in workflow.runs() if r.data["status"] == "waiting"]

for run in waiting:
    step = next(s for s in run.data["steps"] if s["status"] == "waiting")
    print(run.id, (step.get("config") or {}).get("title"))

Mind the overlap

A schedule that fires faster than the chain finishes produces runs that overlap. A chain with an approval in it can wait for days — a weekly schedule on it is a queue, not a cycle.

A schedule spends on its own

Every firing costs what its steps cost, with nobody deciding each time. Watch run.data.credits across runs before setting a frequent schedule.