diff --git a/public/temp/tmp-1-1725944572643 b/public/temp/tmp-1-1725944572643 new file mode 100644 index 0000000..37d3563 Binary files /dev/null and b/public/temp/tmp-1-1725944572643 differ diff --git a/public/temp/tmp-2-1725944572654 b/public/temp/tmp-2-1725944572654 new file mode 100644 index 0000000..37d3563 Binary files /dev/null and b/public/temp/tmp-2-1725944572654 differ diff --git a/public/temp/tmp-3-1725944572665 b/public/temp/tmp-3-1725944572665 new file mode 100644 index 0000000..37d3563 Binary files /dev/null and b/public/temp/tmp-3-1725944572665 differ diff --git a/public/temp/tmp-4-1725944572671 b/public/temp/tmp-4-1725944572671 new file mode 100644 index 0000000..37d3563 Binary files /dev/null and b/public/temp/tmp-4-1725944572671 differ diff --git a/public/temp/tmp-5-1725944572681 b/public/temp/tmp-5-1725944572681 new file mode 100644 index 0000000..37d3563 Binary files /dev/null and b/public/temp/tmp-5-1725944572681 differ diff --git a/public/temp/tmp-6-1725944572689 b/public/temp/tmp-6-1725944572689 new file mode 100644 index 0000000..37d3563 Binary files /dev/null and b/public/temp/tmp-6-1725944572689 differ diff --git a/resources/Task/TaskController.js b/resources/Task/TaskController.js index 1347f09..9495dc8 100644 --- a/resources/Task/TaskController.js +++ b/resources/Task/TaskController.js @@ -138,6 +138,7 @@ export const assignTask = async (req, res) => { export const getTasksByStatus = async (req, res) => { try { + await updateOverdueTasks(); const { status } = req.params; // This should be "New", "Pending", or "Completed" // Validate the provided status @@ -167,6 +168,7 @@ export const getTasksByStatus = async (req, res) => { }; export const getAllTasksByStatus = async (req, res) => { try { + await updateOverdueTasks(); const { status } = req.params; // This should be "New", "Pending", or "Completed" // Validate the provided status @@ -201,6 +203,7 @@ export const getAllTasksByStatus = async (req, res) => { }; export const getTasksbytask = async (req, res) => { try { + await updateOverdueTasks(); const { task } = req.params; // Validate the provided status diff --git a/server.js b/server.js index 0826735..15f957a 100644 --- a/server.js +++ b/server.js @@ -30,7 +30,7 @@ app.get("/", (req, res) => { }); // } // Schedule the cron job -cron.schedule("10 0 * * *", updateOverdueTasks, { +cron.schedule("3 0 * * *", updateOverdueTasks, { timezone: "Asia/Kolkata", }); //<---------deployement------------->