• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.

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