• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue How to run mautic cron job in plesk

dollysingh197

New Pleskian
I need to run mautic cron job in plesk.

This is the command:

php /var/www/vhosts/example.com/httpdocs/mymautic/app/console mautic:segments:update

I tried running this command as it is but it is not working and I have also tried running /usr/bin/php /var/www/vhosts/example.com/httpdocs/mymautic/app/console mautic:segments:update still it is not working because when I run a command on ssh /usr/bin/php

I get the following output:
-bash: /usr/local/bin/php: No such file or directory

How do I run this cron job please help me resolve this issue..
 
If you didnt install the OS PHP Version the only php binaries are usually in /opt
Try this (when logged in via ssh):
ls -l /opt/plesk/php/*/bin/php*
 
@Franz Stancl This is what they are showing when I RUN: ls -l /opt/plesk/php/*/bin/php*

-rwxr-xr-x 1 root root 5613688 Feb 17 04:16 /opt/plesk/php/7.3/bin/php
-rwxr-xr-x 1 root root 5506856 Feb 17 04:16 /opt/plesk/php/7.3/bin/php-cgi
-rwxr-xr-x 1 root root 5740960 Feb 17 04:16 /opt/plesk/php/7.3/bin/phpdbg
-rwxr-xr-x 1 root root 5601392 Mar 5 00:15 /opt/plesk/php/7.4/bin/php
-rwxr-xr-x 1 root root 5490464 Mar 5 00:15 /opt/plesk/php/7.4/bin/php-cgi
-rwxr-xr-x 1 root root 5724568 Mar 5 00:15 /opt/plesk/php/7.4/bin/phpdbg
 
So you have two versions of php: 7.3 and 7.4
Depending which you want to use you might try:

/opt/plesk/php/7.4/bin/php /var/www/vhosts/example.com/httpdocs/mymautic/app/console mautic:segments:update
 
Back
Top