EN

@core / jobs

1.1.3 ▾
verifiedMIT
GitHub

Background jobs on Postgres: durable queue, retries with backoff, cron schedules and a serverless cron endpoint

Code9 filesContext~696 tokensscan passed

The exact tree that will be injected, after .genpmignore. Pinned to

src/lib/jobs/adapters/next.tsread-only · 10f7c8e
// Adaptador Next.js: `app/api/cron/route.ts` → `export const POST = cronRoute; export const GET = cronRoute;`
// (Vercel Cron llama con GET y envía `Authorization: Bearer <CRON_SECRET>`). Añade `export const dynamic = 'force-dynamic'`.
import { isAuthorizedCron, runDue } from '../index.ts';

export async function cronRoute(req: Request): Promise<Response> {
  if (!isAuthorizedCron(req.headers.get('authorization'))) return Response.json({ error: 'unauthorized' }, { status: 401 });
  return Response.json(await runDue());
}

Report @core/jobs

Sign in with GitHub to report a package.