From a3bb3c409f6273e4c495c081342e6be8e9a3978f Mon Sep 17 00:00:00 2001 From: Sibunnayak Date: Thu, 29 Aug 2024 10:21:48 +0530 Subject: [PATCH] task --- resources/Task/TaskController.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/Task/TaskController.js b/resources/Task/TaskController.js index 5b3f19f..3436828 100644 --- a/resources/Task/TaskController.js +++ b/resources/Task/TaskController.js @@ -1,7 +1,6 @@ import Task from "./TaskModel.js"; import crypto from "crypto"; import cron from "node-cron"; -import tz from "cron-timezone"; // Function to update task statuses const updateOverdueTasks = async () => { try { @@ -27,9 +26,8 @@ const updateOverdueTasks = async () => { }; // Schedule the cron job to run daily at midnight -cron.schedule('20 10 * * *', updateOverdueTasks, { - scheduled: true, - timezone: "Asia/Kolkata" // Explicitly setting to GMT+5:30 +cron.schedule('25 10 * * *', updateOverdueTasks, { + timezone: "Asia/Kolkata" }); // cron.schedule("30 9 * * *", updateOverdueTasks);