Another script that runs ok from command line but fails as a cron job.
Code:
#!/bin/bash -l
# this script checks to see if the "node bnlserver.js" program is running
# and restarts it if not
if ! ps -ef | grep -q "[b]nlserver[.]js"; then
node bnlserver.js
fi
The script and node and bnlserver.js are all in /home/k4elo/bin
The cron job setup was /home/k4elo/bin/restart_node_server.sh
The cron job executes the script and it errors saying node - no such file or directory
Tried putting in
Code:
PATH = $PATH:/home/k4elo/bin
But that errors with PATH - no such command
Any help greatly appreciated.