update
This commit is contained in:
20
index.js
20
index.js
@@ -8,7 +8,9 @@ app.get("/", (req, res) => {
|
||||
res.json("Scheduler App");
|
||||
});
|
||||
|
||||
cron.schedule("0 9 * * *", async () => {
|
||||
cron.schedule(
|
||||
"0 9 * * *",
|
||||
async () => {
|
||||
const module = "Birthday Notification";
|
||||
try {
|
||||
let res = await axios.get("http://36.66.3.44:7010/birthday-notification");
|
||||
@@ -16,9 +18,15 @@ cron.schedule("0 9 * * *", async () => {
|
||||
} catch (error) {
|
||||
console.error(module, "error", error.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
{
|
||||
timezone: "Asia/Jakarta",
|
||||
}
|
||||
);
|
||||
|
||||
cron.schedule("0 9 * * *", async () => {
|
||||
cron.schedule(
|
||||
"1 9 * * *",
|
||||
async () => {
|
||||
const module = "Workanniversary";
|
||||
try {
|
||||
let res = await axios.get(
|
||||
@@ -28,7 +36,11 @@ cron.schedule("0 9 * * *", async () => {
|
||||
} catch (error) {
|
||||
console.error(module, "error", error.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
{
|
||||
timezone: "Asia/Jakarta",
|
||||
}
|
||||
);
|
||||
|
||||
app.use((req, res) => {
|
||||
res.json("What are you looking for?!");
|
||||
|
||||
Reference in New Issue
Block a user