make cron job run once a week

This commit is contained in:
Alexandra
2024-10-25 02:31:12 -06:00
parent 3f71828911
commit 40f12486b7

View File

@@ -89,7 +89,7 @@ async function loadFileList(){
if (
process.env.FORCE_FILE_REBUILD == "1" ||
!FileHandler.fileExists(fileListPath) ||
FileOlderThan(fileListPath, "1w")
FileOlderThan(fileListPath, "2w")
) {
await getFilesJob();
} else {
@@ -219,4 +219,4 @@ server.on("listening", function () {
});
console.log(`Loaded ${fileCount} known files.`);
cron.schedule("0 30 2 * * *", getFilesJob);
cron.schedule("0 30 2 * * 0", getFilesJob);