import { logger } from '../utils/logger.js';
import { startCalendarNotificationCron, triggerEventNotifications, triggerSingleEventNotification } from './calendar/index.js';
import { startAuditCleanupCron, cleanupOldAuditLogs } from './cleanupAuditLogs.js';

/**
 * Start all cron jobs
 */
export const startAllCronJobs = () => {
  // Calendar event notifications
  const calendarJob = startCalendarNotificationCron();
  logger.info(`Cron: ${calendarJob.name}`);

  // Audit logs cleanup
  const auditJob = startAuditCleanupCron();
  logger.info(`Cron: ${auditJob.name}`);
};

// Export individual functions for testing/manual triggers
export { triggerEventNotifications, triggerSingleEventNotification, cleanupOldAuditLogs };
