Which Cloudflare product(s) does this pertain to?
Wrangler core
What version(s) of the tool(s) are you using?
3.48.0
What version of Node are you using?
21.7.2
What operating system and version are you using?
macOS Sonoma 14.4.1
Describe the Bug
Observed behavior
When developing a Worker with a scheduled handler, invoking the handler via http://localhost:8787/cdn-cgi/mf/scheduled throws the following error:
✘ [ERROR] Received a ScheduledEvent but we lack a handler for ScheduledEvents (a.k.a. Cron Triggers). Did you remember to export a scheduled() function?
Expected behavior
scheduled handler should be detected and executed.
Steps to reproduce
Please provide the following:
export default {
scheduled() {
console.log("Hey!");
}
}
{
"name": "cron-test",
"main": "index.js",
"compatibility_date": "2024-04-07",
"triggers": {
"crons": ["0 0 * * * * *"]
}
}
$ curl http://localhost:8787/cdn-cgi/mf/scheduled
exception%
Please provide any relevant error logs
$ wrangler dev -j
⛅️ wrangler 3.48.0
-------------------
⎔ Starting local server...
▲ [WARNING] Miniflare 3 does not support CRON triggers yet, ignoring...
[wrangler:inf] Ready on http://localhost:8787
✘ [ERROR] Received a ScheduledEvent but we lack a handler for ScheduledEvents (a.k.a. Cron Triggers). Did you remember to export a scheduled() function?
Which Cloudflare product(s) does this pertain to?
Wrangler core
What version(s) of the tool(s) are you using?
3.48.0
What version of Node are you using?
21.7.2
What operating system and version are you using?
macOS Sonoma 14.4.1
Describe the Bug
Observed behavior
When developing a Worker with a scheduled handler, invoking the handler via
http://localhost:8787/cdn-cgi/mf/scheduledthrows the following error:Expected behavior
scheduledhandler should be detected and executed.Steps to reproduce
Please provide the following:
wrangler.json:{ "name": "cron-test", "main": "index.js", "compatibility_date": "2024-04-07", "triggers": { "crons": ["0 0 * * * * *"] } }curlcommand:Please provide any relevant error logs