Sveltekit cron scheduled functions throwing not found

I have a simple Sveltekit endpoint that I need to run on a schedule. Unlike Next.js, I don’t think it is possible to export a config see: Next.js advanced API routes | Netlify Docs (this would be super cool to get support for) anyways…

Instead I am forced to define a schedule in my netlify.toml.

[functions."global-warmer"]
  schedule = "*/1 * * * *"

Error thrown in function logs:

Jun 3, 12:29:01 PM: 96adccff ERROR  Error: Not found: /.netlify/functions/global-warmer
    at resolve (file:///var/task/.netlify/functions-internal/global-warmer.mjs:20321:18)
    at resolve (file:///var/task/.netlify/functions-internal/global-warmer.mjs:20216:34)
    at Object.handle (file:///var/task/.netlify/functions-internal/global-warmer.mjs:1236:27)
    at respond (file:///var/task/.netlify/functions-internal/global-warmer.mjs:20214:44)

I have tried defining the Netlify functions directory to “functions” and “functions-internal” but still no luck.

Any help with this :slight_smile:

Please share a site name to check and also some steps on how to reproduce the issue.

Please file a request to SvelteKit :slight_smile:
They create and maintain the Netlify integration, as opposed to us maintaining the integration for Next.js.