From 5037b3ea03d3d7d694dbbf55acd02e80a0582a2f Mon Sep 17 00:00:00 2001 From: teddys48 Date: Thu, 9 Oct 2025 09:42:12 +0700 Subject: [PATCH] update --- index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/index.js b/index.js index be5b44b..f10e876 100644 --- a/index.js +++ b/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) => { res.json("What are you looking for?!"); });