update
This commit is contained in:
6
index.js
6
index.js
@@ -44,9 +44,7 @@ cron.schedule(
|
||||
);
|
||||
|
||||
cron.schedule("* * * * *", async () => {
|
||||
exec(
|
||||
'bash /home/script/script.sh',
|
||||
(error, stdout, stderr) => {
|
||||
exec("bash /home/script/script.sh", (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`Gagal menjalankan script: ${error.message}`);
|
||||
return;
|
||||
@@ -58,7 +56,7 @@ cron.schedule("* * * * *", async () => {
|
||||
}
|
||||
|
||||
console.log(`Output: ${stdout}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
app.use((req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user