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