Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Cron HTTP report

Template: cron-http-report ยท category: offchain ยท risk: monitor_only

A cron workflow POSTs an HMAC-signed JSON report to an HTTP endpoint on a schedule. Pure off-chain: no networks and no signer, so neither embedded engine boots. Runnable sibling: examples/ops-monitor.

When to use it

  • heartbeats into a status page, sink, or internal dashboard
  • scheduled webhooks toward systems that verify an HMAC signature
  • the smallest possible rflow project to learn the journal/run model on

Generate it

rflow new --template cron-http-report
# or into an existing project:
rflow add workflow cron-http-report

Inputs

keytypedefault
project_namestringcron-http-report
report_croncron*/5 * * * *
report_urlstringhttp://localhost:9099/report
report_namestringheartbeat
hmac_envenv_varREPORT_HMAC_SECRET

Required env vars

DATABASE_URL and the HMAC secret env var (default REPORT_HMAC_SECRET) โ€” listed in the generated .env.example. The secret signs every report body (HMAC-SHA256) so the receiver can verify authenticity.

Run it locally

docker compose up -d
rflow validate
rflow start

Common modifications

  • add an on-chain read: step before the report (see examples/ops-monitor)
  • point report_url at a real sink and rotate the HMAC secret
  • add notify: on top for human-visible heartbeats