Surface audit generations on dashboard audits

This commit is contained in:
2026-06-06 18:14:27 +02:00
parent 3efbc06e40
commit e9463e8ef2
20 changed files with 3181 additions and 38 deletions

26
v2_elemente/crons.ts Normal file
View File

@@ -0,0 +1,26 @@
/**
* convex/crons.ts
*
* Zeitgesteuerte Ausführung. Prüft regelmäßig auf fällige Kampagnen
* (nextRunAt <= now) und stößt je einen Lauf an.
*/
import { cronJobs } from "convex/server";
import { internal } from "./_generated/api";
const crons = cronJobs();
crons.interval(
"fällige Kampagnen ausführen",
{ minutes: 15 },
internal.campaigns.runDueCampaigns,
{},
);
crons.daily(
"audit-lifecycle",
{ hourUTC: 3, minuteUTC: 0 },
internal.audits.processLifecycle,
{},
);
export default crons;