Closed ovidiulaz7 closed 6 years ago
Is NPM bin path exposed to your root user?
if not you can try to use the full binary path in your cron definition. Something like:
*/5 * * * * /full/path/bin/godaddy-dns > /var/log/godaddy-dns.log 2>&1
If I run it in terminal just using 'godaddy-dns' with the root user it runs, so I think the npm bin path is exposed to root user..
I already tried with full path too:
/1 * /usr/local/bin/godaddy-dns > /var/log/godaddy-dns.log 2>&1
log output file:
/usr/bin/env: node: No such file or directory
Then it seems node to be missing in your cron user...
which node /usr/local/bin/node
node --version v6.9.2
Hey sorry for the delay, i hope you already figured it out but to me it seems that you are either missing node
or /usr/bin/env
for some reason is not present in your machine.
The following approach might work even though it might not be the cleanest:
*/1 * * * * /usr/local/bin/node /usr/local/bin/godaddy-dns > /var/log/godaddy-dns.log 2>&1
it works indeed.
thanks you for your time. :)
Glad it works :)
Log file output:
/bin/sh: 1: godaddy-dns: not found
which godaddy-dns /usr/local/bin/godaddy-dns
cronjob:
/5 * godaddy-dns > /var/log/godaddy-dns.log 2>&1
cronjob installed under root user.
any ideas?
if I type
godaddy-dns [Tue Jul 03 2018 12:19:10 GMT+0300 (EEST)] Current ip and last ip match. No update neccessary.
Thanks.