Docs › Azure Functions timer trigger with RunVouch

Azure Functions timer trigger with RunVouch

A timer-triggered function that runs, catches its own exception and returns is a success in Application Insights. A function app that is stopped does not run at all, and no default alert says so.

How it runs on Azure Functions timer trigger

Inside the function, with the Python client or the two HTTP calls. NCRONTAB schedule stays as it is.

Store the key

Store the key in Key Vault and reference it from an app setting (@Microsoft.KeyVault(SecretUri=...)), or as a plain app setting for a first test.

Report the run (two HTTP calls)

import azure.functions as func, runvouch
app = func.FunctionApp()

@app.timer_trigger(schedule="0 0 2 * * *", arg_name="timer")
def nightly_report(timer: func.TimerRequest):
    with runvouch.vouch("nightly-report", evidence=lambda: {"blob_written": ok}) as run:
        ok = build_report()

The start call returns run_id; the end call takes status (ok or fail), optional cost and tokens, and evidence as a JSON object of booleans. Full reference on the API page.

Register the cadence and caps

rv agent nightly-report --cadence 24h --grace 30m --max-runtime 1h --evidence --cap-run-cost 2

Register the agent once, from anywhere with the key. Cadence is what turns a schedule that stopped into an alert; --evidence makes a run without evidence a failure; the caps pause the agent when it overspends.

What goes silent on Azure Functions timer trigger

What RunVouch detects

AlertWhat it means here
MISSEDcadence plus grace passed and no run started
FAILEDnon-zero exit or a reported failure, with the stderr excerpt
NO_EVIDENCEthe run said ok but the file, URL or assertion you required is missing
STALLEDa run started and never ended within max runtime
RETRY_STORMthe same tool called with identical input many times in one run
BUDGET_RUN / BUDGET_DAYcost cap crossed; the agent is paused until you resume it
DRIFTduration or output size far off its 7-run baseline

Need a key? Get a free key · Stuck? contact