MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / cronCalled

Function cronCalled

packages/deno/src/integrations/deno-cron.ts:37–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 async function cronCalled(): Promise<void> {
38 if (!SETUP_CLIENTS.has(getClient() as Client)) {
39 return fn();
40 }
41
42 await withMonitor(monitorSlug, async () => fn(), {
43 schedule: { type: 'crontab', value: parseScheduleToString(schedule) },
44 // (minutes) so 12 hours - just a very high arbitrary number since we don't know the actual duration of the users cron job
45 maxRuntime: 60 * 12,
46 // Deno Deploy docs say that the cron job will be called within 1 minute of the scheduled time
47 checkinMargin: 1,
48 });
49 }
50
51 return target.call(thisArg, monitorSlug, schedule, options || {}, cronCalled);
52 },

Callers

nothing calls this directly

Calls 5

getClientFunction · 0.90
withMonitorFunction · 0.90
parseScheduleToStringFunction · 0.90
hasMethod · 0.65
fnFunction · 0.50

Tested by

no test coverage detected