• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

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