Instantly share code, notes, and snippets.

@magician11 /crontab
Last active Apr 30, 2018

Embed
What would you like to do?
How to automatically restart a Node.js script (with forever) on a server reboot
NODE_ENV=production
PATH=/root/.nvm/versions/node/v8.11.1/bin:$PATH
@reboot cd /var/server/script-directory && /root/.nvm/versions/node/v8.11.1/bin/forever start myscript.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment