This commit is contained in:
teddys48
2025-10-09 09:42:12 +07:00
parent 08c8783d45
commit 5037b3ea03

View File

@@ -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) => {
res.json("What are you looking for?!");
});