© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•2y ago•
2 replies
_pear

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
wrangler dev
and hit the endpoint the curl command from the docs and it worked fine:
curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*"
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()
Error: Handler does not export a fetch()

I don't understand why it worked then started failing like this. Any suggestions?
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Locally testing a Worker with both a fetch and a scheduled handler
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
handler does export fetch() function
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
Scheduled worker gets an error in production, not locally
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
"Handler does not export a scheduled() function" - No matter how it's exported
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
11mo ago