Skip to content

ambiten


ambiten / core / scheduleGarbageCollector

Function: scheduleGarbageCollector()

scheduleGarbageCollector(options?): ScheduledTask

Defined in: packages/core/src/gc/gcCron.node.ts:23

Schedules registry-driven garbage collection.

The cron task uses registered model instances and delegates cleanup to model.runGC() so Ambiten's runtime context, middleware, schema hooks, instrumentation, cache invalidation, and events remain centralized.

Parameters

options?

string | GarbageCollectorScheduleOptions

Cron expression or scheduler options.

Returns

ScheduledTask

The scheduled cron task.

Context-aware execution infrastructure for multi-tenant systems.