Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
TypeScript
12345678910111213141516171819202122232425262728293031// Props: https://github.com/getsentry/sentry-javascript/issues/9335#issuecomment-1779057528import { captureCheckIn, flush } from "@sentry/nextjs";
export function runSentryCron(monitorSlug: string) { // ๐ก Notify Sentry your job is running: const checkInId = captureCheckIn({ monitorSlug, status: "in_progress", }); return { cronCompleted: async () => { // ๐ข Notify Sentry your job has completed successfully: captureCheckIn({ checkInId, monitorSlug, status: "ok", }); return flush(); }, cronFailed: async () => { // ๐ด Notify Sentry your job has failed: captureCheckIn({ checkInId, monitorSlug, status: "error", }); return flush(); }, };}