MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / triggerCron

Function triggerCron

apps/api/e2e/lib.ts:128–136  ·  view source on GitHub ↗
(type: string)

Source from the content-addressed store, hash-verified

126
127/** Run a worker cron on demand via the local /debug/cron endpoint. */
128export async function triggerCron(type: string) {
129 const res = await fetch(`${WORKER_URL}/debug/cron/${type}`, {
130 method: 'POST',
131 headers: { accept: 'application/json' },
132 });
133 if (!res.ok) {
134 throw new Error(`trigger cron ${type} ${res.status}: ${await res.text()}`);
135 }
136}
137
138export const triggerReaper = () => triggerCron('sessionReaper');
139

Callers 2

drainFunction · 0.90
triggerReaperFunction · 0.85

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected