Local Explorer invokes a Worker scheduled() handler during local development
Introduced 2026-10-17 · score 0.97
HOW TO USE IT
When testing `scheduled()` locally, start a development server and use Local Explorer’s Cron Triggers page or API to invoke a configured or ad hoc cron expression, then inspect the result. Full logs and traces are available in the Worker’s owning development session when Observability is enabled.
curl -X POST "http://localhost:8787/cdn-cgi/local/explorer/api/local/scheduled?worker=<worker-name>" -H "Content-Type: application/json" --data '{"cron":"0 * * * *","scheduled_time":1745856238000}'npx wrangler devWHY THIS HELPS
Test a Worker's scheduled() handler during local development by invoking a configured or ad hoc Cron Trigger and inspecting its outcome.
BEFORE THIS CHANGE
The scheduled handler documentation describes invoking it with an HTTP request to `/cdn-cgi/local/scheduled`; `?format=json` returns a structured result.
REQUIREMENTS AND LIMITATIONS
- worker (required): Exact Worker name targeted by the API request.
- cron (required): Cron expression for the invocation.
- scheduled_time: Scheduled time in milliseconds since the Unix epoch.
- Prerequisite: Use Wrangler 4.118.0 or later, or Cloudflare Vite plugin 1.50.0 or later, for Local Explorer.
- Prerequisite: Start a local development session; Local Explorer is available at `/cdn-cgi/local/explorer` on its server.
- Ad hoc triggers and scheduled time presets stay in the browser and do not change cloudflare.config.ts, Wrangler configuration, or deployed Cron Triggers.
- Local development does not run cron schedules automatically.
- Full logs and traces are available in the development session that owns the Worker when that session has Observability turned on.
- The API request targets an exact Worker name and accepts a cron expression and optional scheduled time.
- The example uses port 8787; replace it with the development server port, such as 5173 for Vite.
FIRST-PARTY EVIDENCE
- https://developers.cloudflare.com/changelog/post/2026-10-17-local-explorer-cron-triggers/
- https://developers.cloudflare.com/workers/local-development/local-explorer/
- https://developers.cloudflare.com/workers/runtime-apis/handlers/scheduled/
Check the installed version and the source before using it. Entry JSON