Cloudflare not locating scheduled function

For Workers & Pages, what is the name of the domain?

https://armadillo-be.tom-73d.workers.dev/

What is the error number?

Error: Handler does not export a scheduled() function

What is the error message?

Error: Handler does not export a scheduled() function

What is the issue or error you’re encountering

My scheduled function matches the documentation

What steps have you taken to resolve the issue?

tried several versions of scheduler function and import/exports

What are the steps to reproduce the issue?

main/index:
import scheduled from ‘./scheduled’;
export { scheduled };

wrangler.toml:
[triggers]
crons = [“*/10 * * * *”]

scheduled.js:
import { updateAllChaletCategories } from ‘./handlers/updateAvailabilityHandler.js’;
export default {
async scheduled(event, env, ctx) {
console.log(‘Scheduled update triggered’);
ctx.waitUntil(updateCategories());
},
};

Despite wrangler.toml, may I ask if you do see a Trigger events configured or not? :thinking:

Related to the “cron”, do you see under the Metrics those requests being executed? :thinking:

Kindly, take into the account the timezone which Scheduled is using and configured by default, it fires differently than your local timezone.

I can see under metrics although it says i need to pay for a more detailed view. If I do wrangler tail i see the trigger called every 10 mins however it always just throws the error that it cant find scheduled().

I also tried removing the import/export of scheduled from my index.
scheduled.js is in my src folder

I also tried deleting scheduled.js, deploying, readding and deployin