I am trying to run an node script with crontab but its not working as I expected (Ubuntu 12.04). In my crontab file I got
*/1 * * * * node /home/me/path/to/script.js > /home/me/path/to/output
This produces empty string output while it shouldn't.
When I run node /home/me/path/to/script.js > /home/me/path/to/output
though, manually, everything goes fine.
Could you help me out with that?
Change node
to what comes from which node
. That is, put full path of the binary executing process.
*/1 * * * * /path/to/node /home/me/path/to/script.js > /home/me/path/to/output
# ^^^^^^^^^^^^^
The value is normally something like /usr/bin/node
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With