#Error: Handler does not export a fetch() for scheduled worker locally

2 messages · Page 1 of 1 (latest)

manic stag
#

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:

Error: Handler does not export a fetch()

I don't understand why it worked then started failing like this. Any suggestions?

jovial crest
#

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