Announcement

Collapse
No announcement yet.

Troubles understanding how to add the crontab line

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

  • Troubles understanding how to add the crontab line

    Hello !

    I installed espocrm last week and since then i'm having troubles understanding what is crontab and how/where i should enter/upload the following line :
    * * * * * cd /home/lifesizebu/www/nea-crm; /usr/local/php7.2/bin/php -f cron.php > /dev/null 2>&1

    Could someone please provide me a begginer's explanation on how to do it ?

    I tried using the command and following instructions on the forum but it got worse with a "Bad Server Response" poping continuously, and i had to reinstall the whole thing.
    Thanks for your help!

    Lucas


  • #2
    Hello,
    run in command line sudo crontab -e -u www-data and add this line here, after Alt+X
    Linux crontab command help and information with crontab examples, syntax, related commands, and how to use the crontab command from the command line.

    What error did you get in espocrm log? (<espocrm_dir>/data/logs/)

    Comment


    • #3
      Hello Tanya and thank you for your fast answer !

      Where should i run this command line ? Do i use PuTTy for that ?
      I already tried using PuTTy, but when i use the command i get "Sudo, command not found"
      Sorry, as you can see i'm a bit lost ..

      Concerning the errors, I understood that i made a mistake duplicating contacts with the same ID, but it's solved now!

      Thanks again
      Lucas

      Comment


      • #4
        Do you have in your control panel something like CronJob, Crontab, Scheduled Jobs or what?

        Comment


        • #5
          In EspoCRM? Yes i have the Scheduled Job (screenshots)
          Or do you mean in my host pannel (OVH) ?

          Comment


          • #6
            Not in EspoCRM, but on your hosting

            Comment


            • #7
              yes i do have this category on my hosting with an empty list of scheduled tasks !
              Should i set the espocrm crontasks directly in my hosting crontask list ?

              Comment


              • #8
                yes, you have to add it here

                Comment


                • #9
                  Ok thank you !
                  So i define the path to the file cron.php in php ?

                  I first tried to enter the path indicated in my espo admin pannel but i have an error message (first image)
                  So it should look like this ? (image 2/3)


                  for now, i still have "Scheduled jobs are not running. Hence inbound emails, notifications and reminders are not working. Please follow the instructions to setup cron job." in my espo admin panel

                  Thank you for your help

                  Comment


                  • #10
                    Ok so now it works, my inbox has mesasges but i doesn't show the last messages, i only see mails received Last month.
                    I also have a "Bad server response" message when i connect.

                    Here is the error shown in the log file :

                    [2018-12-11 14:43:42] Espo.ERROR: Uncaught Exception PDOException: "SQLSTATE[HY000] [2002] No such file or directory" at /home/lifesizebu/www/nea-crm/application/Espo/ORM/EntityManager.php line 157 {"exception":"[object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /home/lifesizebu/www/nea-crm/application/Espo/ORM/EntityManager.php:157)"} []

                    What should i do ?

                    thank you !

                    Comment


                    • #11
                      this error is about mysql connection. when do you get this error? could you debug it?

                      Comment

                      Working...
                      X