Jump to content

Recommended Posts

Posted

I want to run a task for every day to update my database. I noticed that heliohost offeres a scheduled task function in plesk.

I was trying that and I tries `node update.js`, `npx node update.js` & npx run update (Script in my package.json that runs  npx node update.js) and it returns a command not found error. Is it possible to use this function for node.js?

Posted

I'd imagine it's possible, but I know there's limitations on what commands the scheduler can see for security. Krydos can answer this in much better detail than I ever could.

Posted

Cron jobs are chrooted and node executable doesn't exist within your chroot. In order to run a node cron you'd need to make a cgi script that runs the node command and use the cron to call the cgi.

  • Krydos changed the title to [Solved] Run Scheduled Task - Node.JS
  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...