This commit is contained in:
teddy
2025-09-29 11:00:12 +07:00
parent 3fa0ebbbc7
commit 2de84c9436

View File

@@ -8,7 +8,7 @@ app.get("/", (req, res) => {
res.json("Scheduler App"); res.json("Scheduler App");
}); });
cron.schedule("* * * * *", async () => { cron.schedule("0 9 * * *", async () => {
const module = "Birthday Notification"; const module = "Birthday Notification";
try { try {
let res = await axios.get("http://36.66.3.44:7010/birthday-notification"); 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) => { app.use((req, res) => {
res.json("What are you looking for?!"); res.json("What are you looking for?!");
}); });