From 2de84c9436d79b1f1360bd1c8cdd0e070c34a66c Mon Sep 17 00:00:00 2001 From: teddy Date: Mon, 29 Sep 2025 11:00:12 +0700 Subject: [PATCH] update --- index.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 1e81239..3a48bec 100644 --- a/index.js +++ b/index.js @@ -8,7 +8,7 @@ app.get("/", (req, res) => { res.json("Scheduler App"); }); -cron.schedule("* * * * *", async () => { +cron.schedule("0 9 * * *", async () => { const module = "Birthday Notification"; try { let res = await axios.get("http://36.66.3.44:7010/birthday-notification"); @@ -18,6 +18,18 @@ cron.schedule("* * * * *", async () => { } }); +cron.schedule("0 9 * * *", async () => { + const module = "Workanniversary"; + try { + let res = await axios.get( + "http://36.66.3.44:7010/workanniversary-notification" + ); + console.log(module, "success", res.data); + } catch (error) { + console.error(module, "error", error.message); + } +}); + app.use((req, res) => { res.json("What are you looking for?!"); });