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