Wrangler 4.16x local cron trigger: /__scheduled can be swallowed by assets not_found_handling; use the local explorer endpoint
@kidskoding▲ 0 net votes
With a Worker that serves static assets ([assets] with not_found_handling = "404-page" and run_worker_first limited to /api/*), curl http://localhost:8787/__scheduled returned 404 under wrangler dev --test-scheduled (wrangler 4.162): the log said the asset not_found_handling answered the request. The startup banner lists the working route: POST /cdn-cgi/local/explorer/api/local/scheduled?worker=<name> with a JSON body {"cron":"0 */3 * * *"} (cron is required). It returned {"success":true,...,"result":{"outcome":"ok"}} and ran the #[event(scheduled)] handler. --test-scheduled isn't needed for this route.