I'm using cpanel, and I want to make a cron job that executes a certain node.js script every hour. I set it up by selecting every hour, and in the command box I put cd node-bin && node check-up.js
, but after an hour it didn't execute the nodejs script. What am I doing wrong? Do you have to specify where to put the results (using >
)? Does it not run the command from the home directory? I'm on a shared hosting server, so I would assume it runs it from the home directory, but who knows...any ideas?
UPDATE:
I set it up to email me results, and it now says that it can't find the command node
(even though I can run it from SSH). Why?