Announcement

Collapse
No announcement yet.

EspoCRM 7.0.10: cronjob does not work, out of ideas, help please

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

  • EspoCRM 7.0.10: cronjob does not work, out of ideas, help please

    Hi,

    I can't get the cron job to work and therefore mass mailings don't send out anymore. I need them to go out

    I have a Turnkey Linux VM (Debian) with EspoCRM version 7.0.10 that iwasmigrated from a full backup from a different install.

    The reason why it's not the newest EspoCRM is explained in detail later in this post, please bare with me.

    I'm having difficulties getting the cron job to work. Espo tells me cron jobs are not working and to set them up as explained in: https://docs.espocrm.com/administrat...etup-a-crontab

    Administration -> planned jobs tells me to put this in crontab:
    Code:
    * * * * * cd /var/www/espocrm; /usr/bin/php -f cron.php > /dev/null 2>&1
    My espo path:
    Code:
    /var/www/espocrm
    which php:
    Code:
    /usr/bin/php
    Code:
    php -v: PHP 8.1.28 (cli) (built: Apr 24 2024 19:23:49) (NTS)
    ps aux | egrep '(apache|httpd)' gives:
    Code:
    www-data
    infos on cron.php in /var/www/espocrm:

    Code:
    -rw-r--r-- 1 www-data www-data 1.5K Mar 15 2023 cron.php
    I pasted

    Code:
    * * * * * cd /var/www/espocrm; /usr/bin/php -f cron.php > /dev/null 2>&1
    into

    Code:
    crontab -e
    (root)

    and

    Code:
    crontab -e -u www-data
    Rebooted the machine, nothing has helped, cron jobs are still listed as being off.


    Any help solving this would be greatly appreciated!




    The reason why it's not the newest EspoCRM:

    1. we just migrated to this new VM from a backup of an old, hosted EspoCRM and need to test if everything works before upgrading
    2. when upgrading via cli there is a hickup. I can upgrade numerous times up to 7.0.10. For newer versions of Espo, I need a newer php. After installing php 8.0/8.1, the "php command.php update" command does not work anymore. Upgrading to the newest php 8.xx version fixes the updater, but now it can't update because php is too new. This is a problem with a lower priority right now.​

  • #2
    p0ddie,

    You are trying to run EspoCRM 7.0.1 on a virtual machine with php 8.1 installed.

    EspoCRM 7.0.1 is not compatible with php 8.1, because support for php 8.1 starts with EspoCRM 7.1.0​: https://github.com/espocrm/espocrm/releases/tag/7.1.0.

    Click image for larger version  Name:	image.png Views:	0 Size:	20.1 KB ID:	106255

    So you need have a virtual machine with php 8.0 so that your instance works properly and you can upgrade it via "php command.php upgrade".

    After you upgrade your instance to 8.0.6 you will need to upgrade your virtual machine's php to 8.1 (or to 8.2, or 8.3).​​ It will be necessary to do this, because starting with EspoCRM 8.1.0, support for php 8.0 has also stopped: https://github.com/espocrm/espocrm/releases/tag/8.1.0.

    Click image for larger version  Name:	image.png Views:	0 Size:	20.6 KB ID:	106256
    Last edited by victor; 05-17-2024, 09:44 AM.

    Comment


    • #3
      Hi,

      I understand, thanks for clarifying. I initially upgraded from php 8.0 to 8.1 because with 7.0.10,
      Code:
      php command.php upgrade
      does not work, not even an error message. Would you suggest downgrading/purging to php 8.0 and then upgrading Espo first?



      Edit:

      I don't get it. I installed php7.4, did

      Code:
      sudo a2enmod php7.4
      sudo service apache2 restart


      picked php7.4 with
      update-alternatives --config php
      , rebooted but when I issue the update command, it just gives me a new line, doesn't do anything and the cron jobs still don't run. What am I doing wrong?
      Last edited by p0ddie; 05-17-2024, 02:49 PM.

      Comment


      • #4
        Code:
        Would you suggest downgrading/purging to php 8.0 and then upgrading Espo first?
        First, the correct version of php must be installed, and only then upgrade your instance.

        An alternative, in my opinion, is to leave the current php 8.1 VM alone.
        - Then install a new virtual machine with php 8.0 and copy your instance and .sql dump there.
        - Update instance from 7.0.1 to 8.0.6.
        - Then either upgrade the php version (to 8.1 or later) on the new virtual machine, and continue the upgrade from EspoCRM 8.0.6 to 8.2.4. Or copy the files of your instance and .sql dump to the old virtual machine where php 8.1 is already installed and continue the upgrade there.

        If you are familiar with Docker Compose: https://docs.espocrm.com/administrat...docker-compose, then changing environments for EspoCRM is much faster there and does not require several virtual machines.​​

        Comment

        Working...
        X