Error: Handler does not export a fetch() for scheduled worker locally
Hi, I'm a bit confused. I just ran this scheduled worker locally using
wrangler dev
and hit the endpoint the curl command from the docs and it worked fine:
curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*"
I tried again at a later time and got the following error:
I don't understand why it worked then started failing like this. Any suggestions?2 Replies
When testing a schedule in dev mode, don't forget to add the --test-scheduled parameter at the end of the command:
npx wrangler dev --test-scheduled=true
hmmm that must be it. thanks!!