Cloudflare Workers .NET / weather sensors
worker check deferred

The flow

Every node lights up while it has work: a queued job, a held lease or a fresh reading.

Cron trigger
*/5 * * * *
→
D1: due sensors
0 of 0 due now
→
Queue
dotnet-telemetry: 0 in flight
→
RateGate
free
→
Weather API
open-meteo.com
→
D1: readings
0 stored

Run the pipeline

Local development has no cron scheduler, so the page does the cron's work on demand: find the due sensors, write a job row for each one and put them on the queue.

readings stored
0
jobs in flight
0
jobs done
0
jobs failed
0
delivery attempts
0 / max 4
lease
30 s per call

No sensor is due: reading one moves its next read forward by its interval. Use Make every sensor due again to get work immediately.

Sensors

The rows the cron trigger selects from, with the due time it compares against.

No sensors. Apply the schema with npx wrangler d1 execute dotnet --local --file=migrations/0001_init.sql.

Latest readings

Written by the consumer once the rate gate let it through. 'simulated' means the weather API could not be reached, so the flow still produced a row.

No readings yet. Queue the due sensors above and the consumer will fill this table.

Jobs

One row per queued sensor, so the retry path is visible: attempts counts deliveries, last_error holds the reason.

No jobs yet.

Calls made from this page

No calls yet.

An unhandled error has occurred. Reload 🗙