Scheduled task
A cron trigger that runs every hour, entirely without a request. Each run writes its result to a KV key, and this page reads the latest value back out of that key.
The trigger
Registered in wrangler.toml, delivered by Cloudflare, handled by WorkerEvents.OnSchedule.
0 * * * * is a standard cron expression: at minute 0 of every hour.
The KV write is handed to context.WaitUntil because the handler returns immediately.
“Run the task now” calls the same code the cron calls and records the run as manual. The last button
asks wrangler dev --test-scheduled to fire the cron as Cloudflare would, and it is opened
in a new tab because that endpoint belongs to wrangler rather than to the worker.
Latest result in KV
Nothing in scheduled_result yet. Wait for the next full hour, or run the
task now.
Run history
Newest first. Stored next to the latest result so the sample can be read without waiting for two hours.
No runs yet.
Calls made from this page
No calls yet.