Open kselax opened 6 years ago
oh, I've solved it. it wasn't forever problem. It is bad knowledge how to use crontab. We to run crontab much better using your own script where you can explicitly to define environment variables
I've made this script script.sh `#!/bin/bash PATH=/home/neo/.nvm/versions/node/v8.11.2/bin/
/home/neo/.nvm/versions/node/v8.11.2/bin/forever start -c /home/neo/.nvm/versions/node/v8.11.2/bin/node /var/www/american-chat.ru/index.js &>> /home/neo/test.crontab ` and now everything works. simply command won't works, because we need to specify bash, we need to specify a path to node.js. with cronetab they seems to be absence.
Hi I have the same problem trying to start forever after @reboot, doesnt't work even after I put this to script
cd ~/lacirolnikdev && sudo ~/.nvm/versions/node/v14.13.1/bin/forever start -c "/.nvm/versions/node/v14.13.1/bin/npm start" . cd ~/coinwork && sudo ~/.nvm/versions/node/v14.13.1/bin/forever start -c "/.nvm/versions/node/v14.13.1/bin/npm start" .
forever list is emty, can you help?
Hello! I tried to run node.js after reboot, put to crontab -e next command
and see nothing. Crontab can't run forever after reboot nor each minute. How to run forever after rebooting the server?
These commands perfectly work if I do it manually in a terminal