update
This commit is contained in:
22
index.js
22
index.js
@@ -123,6 +123,28 @@ cron.schedule(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
cron.schedule(
|
||||||
|
"14-19 7 * * *",
|
||||||
|
async () => {
|
||||||
|
exec("sh /home/script/script3.sh", (error, stdout, stderr) => {
|
||||||
|
if (error) {
|
||||||
|
console.error(`Gagal menjalankan script antribgr1: ${error.message}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stderr) {
|
||||||
|
console.error(`Stderr antribgr1: ${stderr}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`Output antribgr1 : ${stdout}`);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
{
|
||||||
|
timezone: "Asia/Jakarta",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
app.use((req, res) => {
|
app.use((req, res) => {
|
||||||
res.json("What are you looking for?!");
|
res.json("What are you looking for?!");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user