Release room-scoped Matrix bot plugins and room configuration

This commit is contained in:
Matrix Bot Project committed 2026-11-20 23:23:04 +08:00
commit 86c7e4359c
76 files changed
+13539

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { CronJob } from 'cron';
export interface Scheduler {
register(cron: string, timeZone: string, run: () => Promise<void>): () => void;
}
export class PluginScheduler implements Scheduler {
register(cron: string, timeZone: string, run: () => Promise<void>): () => void {
const job = new CronJob(cron, () => { void run().catch(() => undefined); }, null, true, timeZone);
return () => job.stop();
}
}