Schedule recurring blueprints | Diaphora Docs | Diaphora

Schedule recurring blueprints

A blueprint you can run on demand is useful. A blueprint that runs itself — on a cadence, with its tools connected and its output delivered — is a product. Diaphora schedules turn any blueprint into a recurring, hands-off job on the managed runtime: you pick when it runs and what parameters it runs with, and the platform handles the rest.

The running example in this guide is a real one: the Weekly Market Intelligence Brief blueprint. Every Monday at 9:00 AM Eastern it analyzes the past week of debt-relief market data, renders an email-ready HTML brief, and sends it to the sales team through the Resend MCP server — no servers, cron jobs, or delivery scripts of your own.

Why schedule on Diaphora

The point isn't just "cron in the cloud." Scheduling on Diaphora means the whole job — trigger, computation, tool access, delivery, and observability — lives in one place, versioned with the blueprint.

Concern Roll your own On Diaphora
Trigger A cron daemon on a box you maintain Native schedules — timezone-aware, with a human-readable cadence preview
Tool access Store, inject, and rotate API keys yourself MCP servers connected once and shown ready; auth is managed for you
Delivery Separate email/reporting pipeline The blueprint sends its own result through an MCP server — delivery is the run
Parameters Hardcode or thread through env vars Per-schedule runtime parameters, edited in the UI
Observability Build your own logging and alerts Execution history and an executions-over-time chart, per blueprint
Changing cadence Edit crontab, redeploy Edit the schedule in the UI — no redeploy

Because the blueprint and its schedule are the same artifact, there's no glue code to drift out of sync. Change the blueprint, and every schedule that runs it picks up the change on the next fire.

The blueprint behind the schedule

A schedule runs a blueprint — so first you have a blueprint worth running. The full Weekly Market Intelligence Brief is in the blueprint marketplace; the excerpts below are the parts that matter for scheduling. (Open the marketplace item to read it end to end, HTML renderer and all.)

Declare the tool and the parameters up front. A system(...) line sets the analyst persona, require mcp Resend connects the email tool, and two parameter(...) lines expose the values the schedule fills in each run:

system("You are an expert financial researcher and industry analyst for a major debt settlement company.")
require mcp Resend
parameter("timeframe", type=string, default="this past week")
parameter("to_address", type=string, title="To Address")

timeframe and to_address aren't hardcoded — the schedule freezes their values per run (below), so the same blueprint can drive this week's brief, a monthly recap, or a one-off to a different inbox.

Each research session gathers one slice and types its output. There are five independent search sessions; the economic dashboard is representative — note how the schema names exactly the columns the email table needs:

session("economic_dashboard") {
    use search

+ Find the most recently published data (from FRED or the Federal Reserve)
      for the fed funds rate, unemployment, credit card delinquency, APR, and more.
    - Extract the data to populate the Leading Indicators Dashboard.

schema {
        metrics: {
            indicator: string         # The name of the economic indicator
            currentValue: string      # Most recent value (include date/period)
            priorPeriodValue: string  # Value from the previous reporting period
            trend: string             # "Up", "Down", or "Flat"
            source: string            # e.g., "FRED", "Federal Reserve"
        }[]
    }
}

The final session renders and delivers. It runs after="economic_dashboard", builds the branded HTML in a deterministic code() PreCall (Resend can't loop over arrays, so the blueprint assembles the rows itself), then hands the finished html/text to Resend's send-email:

session("send_email", after="economic_dashboard") {
    use mcp Resend

# Render branded HTML + a plain-text fallback from every session's output.
    call("render_email") -> vars:email {
        code( /* build html + text from $(context) … */ )
        data      = $( context )
        timeframe = "{{ .params.timeframe }}"
    }

call("send-email") {
        to      = $( [params.to_address] )
        from    = "notifications@acme.ai"
        subject = "Weekly Industry Brief: {{ .params.timeframe }}"
        html    = $( vars.email.html )
    }

- Output true for sentSuccessfully to confirm the session ran.
    schema { sentSuccessfully: bool }
}

Three things worth calling out:

Create a schedule in the UI

Open the blueprint and select Schedules in the left rail. The first time, you'll see an empty state — click Create the first one (or + New schedule in the top right on later visits).

The Schedules tab before any schedule exists — start with "Create the first one."

1. Name the schedule. Give it something you'll recognize in the list — e.g. Monday Report — week prior. A blueprint can hold several schedules, so the name is how you tell them apart.

2. Set the timezone. Cadences fire in the timezone you pick — here, America/New_York. This matters for "9 AM": the platform resolves the fire time in your timezone and handles daylight-saving shifts.

3. Pick the cadence. Choose one of Hourly · Daily · Weekly · Monthly. For the newsletter, select Weekly, then:

As you choose, the panel shows a plain-English preview so there's no cron syntax to second-guess:

🕘 Every Monday at 9:00 AM (America/New_York)

4. Set the runtime parameters. Under Parameters, fill in the values this run should use. The newsletter blueprint exposes timeframe, so set it to this past week. These are the same parameters the blueprint declares with parameter(...) — the schedule freezes the values used on each run.

The New schedule form: timezone, a weekly cadence on Monday at 09:00 with the plain-English preview, and the timeframe parameter set to "this past week."

5. Save. The schedule appears in the blueprint's Schedules list with its name and cadence, and edit (✏️) / delete (🗑️) controls. It will fire on the next matching time — no further action needed.

The saved schedule in the blueprint's Schedules list, showing its name and "Every Monday at 9:00 AM (America/New_York)" cadence with edit and delete controls.

Watch it run

Back on the blueprint overview, the Executions over time chart tracks runs over the last few days, so you can confirm the schedule is firing and spot a run that didn't. Each fire executes the blueprint end to end: the five research sessions gather the week's regulatory, competitor, lending, marketing, and economic data, then send_email renders the branded HTML and delivers it through Resend — the same structured output you'd get from a manual run, on autopilot.

To change the cadence or parameters, edit the schedule in place — there's nothing to redeploy. To pause the job, delete the schedule; the blueprint itself is untouched and still runnable on demand.

Next steps

Run a blueprint automatically on a cadence — schedule a weekly market brief that analyzes data and emails an HTML report through the Resend MCP server, all on Diaphora's managed runtime.