Adding a vercel.json
file with the following cron job breaks Vercel deployments on master
in my SvelteKit project.
{"crons": [ {"path": "/api/cron","schedule": "* * * * *" } ]}
With no logs or anything to indicate what the issue is.
I have a cron job setup in /src/routes/api/cron/+server.js
import { invalidate } from "$app/navigation"export function GET(req) { if (req.headers.get('Authorization') === `Bearer ${process.env.CRON_SECRET}`) { invalidate('calendar:load') return new Response("Success!") } else { return new Response('Not found', { status: 404 }) }}
It seems like there is a configuration issue that's causing a completely silent fail.