check if a listing is still active

This commit is contained in:
orangecoding
2025-09-21 15:53:01 +02:00
parent 28eddc5d7f
commit 1e18019c9a
19 changed files with 382 additions and 60 deletions

View File

@@ -0,0 +1,13 @@
import cron from 'node-cron';
import runActiveChecker from '../listings/listingActiveService.js';
async function runTask() {
await runActiveChecker();
}
export async function initActiveCheckerCron() {
//run directly on start
await runTask();
// then every day at 1 am
cron.schedule('0 1 * * *', runTask);
}