diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index f422b7c3..13da76bf 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -7303,7 +7303,7 @@ cron.schedule('* * * * *', async () => { }); //run the every one hour -cron.schedule('0 * * * *', async () => { +cron.schedule('0 */3 * * *', async () => { console.log("Checking for user notification times..."); await calculateLowWaterLevelAndNotify(); await calculateCriticalLowWaterLevelAndNotify(); @@ -7311,6 +7311,7 @@ cron.schedule('0 * * * *', async () => { timezone: "Asia/Kolkata", }); + // Schedule notifications at 6 AM, 12 PM, 6 PM, and 12 AM // cron.schedule( // "0 6,12,18,0 * * *", // Cron expression for the required times