benmmonster Posted October 9, 2023 Share Posted October 9, 2023 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? Link to comment Share on other sites More sharing options...
wolstech Posted October 10, 2023 Share Posted October 10, 2023 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. Link to comment Share on other sites More sharing options...
Krydos Posted October 10, 2023 Share Posted October 10, 2023 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. Link to comment Share on other sites More sharing options...
benmmonster Posted October 10, 2023 Author Share Posted October 10, 2023 Okay. I am going to see about having it fetch a webpage and set that to be the trigger. Link to comment Share on other sites More sharing options...
Recommended Posts