Announcement

Collapse
No announcement yet.

Can be run only via CLI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can be run only via CLI

    Hi All

    It's been a long day.

    We have just noticed that our cron jobs are not working and can trace the issue back to the EspoCRM-upgrade-5.9.4-to-6.0.10

    In SSH the following is set up within Crontab

    * * * * * /usr/bin/php7.4 /pages/30/c622445020/htdocs/ESPOCrm/cron.php > /pages/30/c622445020/htdocs/ESPOCrm/log.txt 2>&1

    The above has been approved by 1and1 as the correct syntax for the Debian GNU/Linux server

    When checking the Logfile we are seeing the following "Can be run only via CLI"

    Running other tasks

    /usr/bin/php7.4 /pages/30/c622445020/htdocs/ESPOCrm/command.php run-job Cleanup.php

    also, give the same response "Can be run only via CLI"

    ------------------------------------

    Note: The following works /usr/bin/php7.4 -f /pages/30/c622445020/htdocs/ESPOCrm/cron_test.php works as expected and is not part of ESPO.

    Any help would be much appreciated

    Thank you in advance

    MATO

  • #2
    For anyone using IONOS to host ESPOCRM please note that you need to add "-cli" to the following to manage the CLI in the PHP path

    /usr/bin/php7.4-cli

    it should look like this

    * * * * * /usr/bin/php7.4-cli /pages/30/c622445020/htdocs/ESPOCrm/cron.php > /pages/30/c622445020/htdocs/ESPOCrm/log.txt 2>&1

    It's the simple things that can create the biggest problems.

    Comment


    • #3
      rel: https://forum.espocrm.com/forum/deve...810-cron-error

      Comment

      Working...
      X