In root user crontab I added the below job:
*/1 * * * * /usr/local/bin/forever start /root/MyCode/server.js >> /root/ou1.log 2>&1
I am getting the below error:
info: Forever processing file: /root/MyCode/server.js
/usr/local/lib/node_modules/forever/lib/forever.js:419
monitor.send(JSON.stringify(options)); ^ TypeError: Object # has no method 'send' at Object.startDaemon (/usr/local/lib/node_modules/forever/lib/forever.js:419:11) at /usr/local/lib/node_modules/forever/lib/forever/cli.js:258:13 at /usr/local/lib/node_modules/forever/lib/forever/cli.js:145:5 at Object.oncomplete (/usr/local/lib/node_modules/forever/lib/forever.js:358:11)
But if I manually run the forever command in terminal, its working..
Forever "version": "0.11.1" node version: v0.10.17
It seems like some problem with the installation. In the above example am using a vagrant box. I installed forever in fresh vagrant box, and it worked..