Netlify cron jobs

How to handle Netlify cron jobs when schedules are dynamic

Netlify scheduled functions are useful for fixed recurring work. If your product needs one schedule per customer, integration, or workflow, you usually need an API-driven scheduler instead of static cron configuration.

What Netlify cron jobs are good at

Netlify works well when you know the schedule ahead of time and can keep it in application configuration. That covers jobs like cache warmups, a daily summary route, or a periodic cleanup task that is the same for every environment.

Where static schedules stop fitting the product

Recurring jobs become harder when the schedule belongs to customer data. A SaaS product might need a different cadence per account, webhook payloads tied to a tenant, or the ability to pause and resume one schedule without redeploying.

The practical architecture

Keep your application logic in a protected Netlify function or route. Let an external scheduler call that endpoint on the cadence your backend created. That makes schedules product data rather than deployment config.

// netlify/functions/run-report.ts
export default async (request: Request) => {
  if (request.headers.get("x-cron-secret") !== process.env.CRON_SECRET) {
    return new Response("Unauthorized", { status: 401 });
  }
  const payload = await request.json().catch(() => ({}));
  await runReportForAccount(payload.accountId);
  return Response.json({ ok: true });
};

Creating the recurring webhook from your backend

With CronCoco, your app creates the schedule through an API request, stores the returned job id, and manages the lifecycle alongside the rest of your product data.

curl -X POST https://api.croncoco.io/jobs \
  -H "Authorization: Bearer coco_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"tenant-report-acme","cron_expression":"0 15 * * 1","webhook_url":"https://your-site.netlify.app/.netlify/functions/run-report","headers":{"x-cron-secret":"YOUR_SECRET"},"payload":{"accountId":"acct_123"}}'

Netlify scheduled functions vs CronCoco

Use Netlify cron jobs when the schedule is fixed and owned by the deployment. Use CronCoco when schedules need to be created, updated, paused, resumed, or deleted from application code.

Where CronCoco fits

CronCoco is a good fit when you want Netlify to stay focused on serving your app while recurring delivery is managed through an external API. Your backend decides what should happen and when, and CronCoco handles the clock and webhook delivery.

For adjacent patterns, read how serverless cron jobs work, when to use a webhook scheduler API, and the Create job API docs.