Cronjob ISPConfig3

Discussion in 'General' started by Udson Assis, May 24, 2022.

  1. Udson Assis

    Udson Assis Member

    Friends, I'm scheduling tasks in cron through the ISPConfig panel, but they are not running as desired.
    I've tried in several ways:

    Every minute: * * * * *

    php7.4 [web_root] /bin/console mautic:emails:send
    php [web_root] /bin/console mautic:emails:send

    php7.4 /var/www/clients/client1/web46/web/bin/console mautic:emails:send
    php /var/www/clients/client1/web46/web/bin/console mautic:emails:send

    cd /var/www/clients/client1/web46/web/bin; php7.4 console mautic:emails:send
    cd /var/www/clients/client1/web46/web/bin; php console mautic:emails:send

    If I run the commands via ssh it works
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The commands are wrong, you must use the full path to any binary when using Linux cron (that's not ISPConfig specific) as Linux cronjobs do not read the PATH variable, so you must tell cron exactly where a binary is. So it's not 'php', it is '/usr/bin/php'.
     
  3. Udson Assis

    Udson Assis Member

    Thanks for the quick response!

    now everything is working!

    I revised the binary path, but also, I had to revise the client configuration, in Task Limits in Cron I changed "Limit of task types in Cron" to "Full Cron".
     

Share This Page