You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
overseerr/server/job/schedule.ts

16 lines
495 B

import schedule from 'node-schedule';
import jobPlexSync from './plexsync';
import logger from '../logger';
export const scheduledJobs: Record<string, schedule.Job> = {};
export const startJobs = (): void => {
// Run full plex sync every 6 hours
scheduledJobs.plexFullSync = schedule.scheduleJob('* */6 * * *', () => {
logger.info('Starting scheduled job: Plex Full Sync', { label: 'Jobs' });
jobPlexSync.run();
});
logger.info('Scheduled jobs loaded', { label: 'Jobs' });
};