Getting this error for executing this cron job script; can you guys please help me get through this?
sh -c 'cd /root/folder && node app'
(Also, once i save the cron job it auto corrects to sh -c 'cd /root/folder && node app
app.js
file is in this path /root/folder/
Type > Shell Script;
Execution Cycle > 1 Minutes;
User > root/ubuntu;
Node Verision > 16.20.0;
OS > Ubuntu 20.04
Cron Execution Log:
`node:internal/modules/cjs/loader:1029
throw err;
^
Error: Cannot find module '/www/server/panel/app'
at Function.Module.resolveFilename (node:internal/modules/cjs/loader:1026:15)
at Function.Module.load (node:internal/modules/cjs/loader:871:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
★[2024-09-17 06:29:26] Successful
----------------------------------------------------------------------------`
Tried it on multiple instances, still getting the similar error!!!