Skip to content

Commit

Permalink
Merge pull request #370 from vgteam/slow-down-cron
Browse files Browse the repository at this point in the history
Stop running the cleanup job every minute
  • Loading branch information
adamnovak authored Nov 28, 2023
2 parents 4bc8e51 + b83cb31 commit abe40a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ async function lockDirectories(directoryPaths, lockType, func) {

// runs every hour
// deletes any files in the download directory past the set fileExpirationTime set in config
cron.schedule('* * * * *', () => {
cron.schedule('0 * * * *', () => {
console.log("cron scheduled check");
// attempt to acquire a write lock for each on the directory before attemping to delete files
for (const dir of [DOWNLOAD_DATA_PATH, UPLOAD_DATA_PATH]) {
Expand Down

0 comments on commit abe40a3

Please sign in to comment.