update
This commit is contained in:
@@ -10,3 +10,9 @@ services:
|
||||
|
||||
mem_limit: 50m
|
||||
cpus: 0.01
|
||||
networks:
|
||||
- scheduler-net
|
||||
|
||||
networks:
|
||||
scheduler-net:
|
||||
external: true
|
||||
|
||||
38
index.js
38
index.js
@@ -13,25 +13,9 @@ cron.schedule(
|
||||
"0 9 * * *",
|
||||
async () => {
|
||||
const module = "Birthday Notification";
|
||||
try {
|
||||
let res = await axios.get("http://36.66.3.44:7010/birthday-notification");
|
||||
console.log(module, "success", res.data);
|
||||
} catch (error) {
|
||||
console.error(module, "error", error.message);
|
||||
}
|
||||
},
|
||||
{
|
||||
timezone: "Asia/Jakarta",
|
||||
}
|
||||
);
|
||||
|
||||
cron.schedule(
|
||||
"1 9 * * *",
|
||||
async () => {
|
||||
const module = "Workanniversary";
|
||||
try {
|
||||
let res = await axios.get(
|
||||
"http://36.66.3.44:7010/workanniversary-notification"
|
||||
"http://email-notification:9997/birthday-notification",
|
||||
);
|
||||
console.log(module, "success", res.data);
|
||||
} catch (error) {
|
||||
@@ -40,7 +24,25 @@ cron.schedule(
|
||||
},
|
||||
{
|
||||
timezone: "Asia/Jakarta",
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
cron.schedule(
|
||||
"1 9 * * *",
|
||||
async () => {
|
||||
const module = "Workanniversary";
|
||||
try {
|
||||
let res = await axios.get(
|
||||
"http://email-notification:9997/workanniversary-notification",
|
||||
);
|
||||
console.log(module, "success", res.data);
|
||||
} catch (error) {
|
||||
console.error(module, "error", error.message);
|
||||
}
|
||||
},
|
||||
{
|
||||
timezone: "Asia/Jakarta",
|
||||
},
|
||||
);
|
||||
|
||||
app.use((req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user