• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Nodejs cron job

cipcip

Basic Pleskian
Hello, I am trying to create a cron job from a node-js application.
I am adding my full path : /usr/bin/nodejs /var/www/vhosts/something/parser.js

I get the following output: /usr/bin/nodejs: No such file or directory

If I open my terminal and check the installation using:
1. which node gives me: /usr/local/bin/node
2. which nodejs gives me: /usr/bin/nodejs

I have tried with both of them but I cannot seem to get it work, I get the same output.

Any suggestions ?

Thank you,
Cristian
 
I suppose you have to use Plesk versions of node.js:

# ll /opt/plesk/node/*/bin/node
-rwxrwxr-x. 1 500 500 41226208 Aug 30 09:15 /opt/plesk/node/10/bin/node
-rwxr-xr-x. 1 1001 psaadm 48935408 Sep 6 09:15 /opt/plesk/node/12/bin/node
-rwxr-xr-x. 1 1001 psaadm 74421432 Sep 6 09:15 /opt/plesk/node/14/bin/node
-rwxrwxr-x. 1 500 500 35028569 Aug 30 09:15 /opt/plesk/node/8/bin/node
 
I have used /opt/plesk/node/14/bin/node ... verified the folder and it exists along with the node file and received the same error: /opt/plesk/node/14/bin/node: No such file or directory

I have then tested with /opt/plesk/node/12/bin/node because if I type node -v, I receive: 12.19.0 as a version, same error ...

I do not understand what is happening
 
What is the output of command:

# ll /opt/plesk/node/*/bin/node

?
 
Hello Igor,

The output is:

ll /opt/plesk/node/*/bin/node
-rwxrwxr-x 1 500 500 41226208 Aug 27 09:18 /opt/plesk/node/10/bin/node
-rwxr-xr-x 1 1001 swkey-data 48935408 Sep 10 09:18 /opt/plesk/node/12/bin/node
-rwxr-xr-x 1 1001 swkey-data 74421432 Sep 3 09:18 /opt/plesk/node/14/bin/node
-rwxrwxr-x 1 500 500 35028569 Aug 27 09:18 /opt/plesk/node/8/bin/node
Thank you!
 
Back
Top