Cron jobs
Call a path of your app on a schedule: cleanups, reports, syncs. Paid plans.
Create a job#
Open a project → Cron → New job. Give it a name, a schedule in standard five-field cron format (minute hour day month weekday, e.g. */15 * * * * or 0 2 * * *), a time zone such as Asia/Jakarta, and the path Cloudvea should call on your live production app, such as /api/cron/cleanup.
Each run is recorded with its status, duration and the start of the response. Run now runs a job immediately; the switch pauses it.
Accept only calls from Cloudvea#
Every call carries Authorization: Bearer $CLOUDVEA_CRON_SECRET. The variable is added to production when you create the first job. Redeploy so your app can read it, then reject other requests:
export async function GET(req: Request) {
if (req.headers.get('authorization') !== `Bearer ${process.env.CLOUDVEA_CRON_SECRET}`) {
return new Response('Unauthorized', { status: 401 });
}
// … your job …
return Response.json({ ok: true });
}A run succeeds when the app answers with a 2xx status within 30 seconds. Longer work should be started by the call and finished in the background.
Plans and limits#
Cron jobs are part of paid plans. The plan sets how many jobs a team can have and how often one job may run; see the pricing page.