import { Cron } from "croner"; import { checkDueDateReminders } from "./due-date-reminders"; const jobs: Cron[] = []; export function initializeScheduler(): void { jobs.push(new Cron("*/5 * * * *", checkDueDateReminders)); console.log("⏰ Scheduler started (due date reminders every 5 minutes)"); } export function shutdownScheduler(): void { for (const job of jobs) { job.stop(); } jobs.length = 0; }