Announcement

Collapse
No announcement yet.

cron job

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

  • cron job

    So to make the jobs happen, we need to add :
    * * * * * /usr/local/bin/php -f /usr/www/users/xxxx/xxxx/crm/cron.php > /dev/null 2>&1

    For the timing / scheduling where there is all * * * * * , I'm used to putting a time notation in there instead of all " * " .
    Must it be left with all " * " , or do we edit as needed , say once every minute so : " * 1 * * * " ?

    I initially added it verbatim, but my email notifications are not going out.
    Any test email from within any setup area has worked fine.
    I'm not getting any errors after editing my crontab, or any errors emailed to me either.




    EDIT: so answered my own question about the " * * * * ", the job is running every minute.

    BUT, Espocrm is not sending out the email reminders for Calls.
    The popups are working as are invites.
    The popup reminders clear out of the particular Call screen after they happen, all the Email reminders are still there agreeing with the fact they never happened/went out.
    Any thoughts of where I should be looking to get the reminders to go out?

    TIA 888
    Last edited by bkny; 04-01-2016, 07:58 PM.

  • #2
    Administration > Scheduled Jobs > Send Email Reminders > Logs
    What's in log?
    Did you setup Outbound Email in Administrations?

    Comment


    • #3
      1218
      Thank you for the response.

      Yes I set up Outbound Email in Administrations, and all test emails I trigger from the test page were sent and received.

      Administration > Scheduled Jobs > Send Email Reminders > Logs , the only entry there is the one Invite I sent from one of the test Calls I setup.
      I received the invite with no problems.

      On the test Calls I setup, the popups always worked, and cleared off the Call's page.
      The email reminders never cleared from the Call's page, and I never received them, so I assume they never went.
      I also doubled checked my spam filter and folder, nothing in there.

      Comment


      • #4
        Email should be sent to Assigned User. Not to contacts. I just tested and it worked.

        Comment


        • #5
          Originally posted by yurikuzn View Post
          Email should be sent to Assigned User. Not to contacts. I just tested and it worked.
          I am the assigned user for the Calls I created and is shown in the Call detail screen (and expected the reminder to go to my email address as I entered in Espocrm for my user info)
          Is that what your referencing?
          If not, where are you referencing?

          ( FYI, if I go into my User page, and click on my email address, from within Espocrm I can send an email to myself, and it's fine. So all the email addresses and authentications are fine and functioning. )




          TIA 105
          Last edited by bkny; 04-05-2016, 12:36 PM.

          Comment


          • #6
            Yes. You do everything right. There should be multiple records in Log panel, creating every 2 minutes. If you see only one it means cron is not running. Check server error log; find out why cron.php is not running.

            Comment


            • #7
              Originally posted by yurikuzn View Post
              Yes. You do everything right. There should be multiple records in Log panel, creating every 2 minutes. If you see only one it means cron is not running. Check server error log; find out why cron.php is not running.

              * * * * * /usr/local/bin/php -f /usr/www/users/xxxx/xxxx/crm/cron.php > /dev/null 2>&1

              we did check, no errors, and the logs show the cronjob above is running every minute.
              But I haven't been able to confirm that the cron.php is actually running.
              While I have xxxx out parts of the path shown above for privacy, following the actual path in the cronjob I did find the cron.php, so the path is correct and it's there.
              What should the permission level be for cron.php ?


              Originally posted by yurikuzn View Post
              ........There should be multiple records in Log panel, creating every 2 minutes. If you see only one it means cron is not running.........
              So every time the cron.php runs, no matter if it sent a scheduled email or not, it should make a log on that page ?

              TIA
              883
              Last edited by bkny; 04-05-2016, 06:25 PM.

              Comment


              • #8
                995
                FYI, the logs were re-reviewed, and no errors are being logged, and it appears to be calling the cron.php w/o a problem.

                So,
                I set up another test call, set up popups and email reminders for on time, 5 mins, and 10 mins.
                I entered my server via SSH, and manually ran the cron.php, every 2 minutes.
                The popups went off in a timely manner perfectly.
                But none of the email reminders went out, even with manually running the cron.php.
                There are no new entries in " Administration > Scheduled Jobs > Send Email Reminders > Logs " .

                Here's what's in the cron.php file :

                Code:
                <?php
                /************************************************************************
                 * This file is part of EspoCRM.
                 *
                 * EspoCRM - Open Source CRM application.
                 * Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
                 * Website: http://www.espocrm.com
                 *
                 * EspoCRM is free software: you can redistribute it and/or modify
                 * it under the terms of the GNU General Public License as published by
                 * the Free Software Foundation, either version 3 of the License, or
                 * (at your option) any later version.
                 *
                 * EspoCRM is distributed in the hope that it will be useful,
                 * but WITHOUT ANY WARRANTY; without even the implied warranty of
                 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                 * GNU General Public License for more details.
                 *
                 * You should have received a copy of the GNU General Public License
                 * along with EspoCRM. If not, see http://www.gnu.org/licenses/.
                 *
                 * The interactive user interfaces in modified source and object code versions
                 * of this program must display Appropriate Legal Notices, as required under
                 * Section 5 of the GNU General Public License version 3.
                 *
                 * In accordance with Section 7(b) of the GNU General Public License version 3,
                 * these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
                 ************************************************************************/
                
                $sapiName = php_sapi_name();
                
                if (substr($sapiName, 0, 3) != 'cli') {
                    die("Cron can be run only via CLI");
                }
                
                include "bootstrap.php";
                
                $app = new \Espo\Core\Application();
                $app->runCron();

                Comment


                • #9
                  Yes. It should log even no email were sent. Maybe /usr/local/bin/php is not actual and there is another php in your system,

                  Comment


                  • #10
                    Originally posted by yurikuzn View Post
                    Yes. It should log even no email were sent. Maybe /usr/local/bin/php is not actual and there is another php in your system,
                    Thank you. 1583
                    I'll double check on the path.

                    I would *think* it's good since the cronjob isn't creating an error log.
                    I have a few others that are sending me errors, since I removed some logs these other cronjobs are looking to processing, so it *seems* my cronjob error reporting is working.
                    Just incase, I cleaned out my crontab of the other cronjobs, and left my Espocrm cronjob, and still no difference (just no longer getting errors from the other cron jobs).

                    Comment


                    • #11
                      So I SSH and doubled check the path, and asked one of the admins, and it is as it is in the cronjob.
                      And again, no errors are being logged, and I can execute the cron.php manually and nothing happens (reminders don't go out and no new log entries in " Administration > Scheduled Jobs > Send Email Reminders > Logs " .

                      I looked in the cron.php, and looked for the file it's calling for, and its where it's supposed to be, and in that looked for what its referencing and it's there.
                      I changed permissions to 754 for all 3, still NG.

                      I'm at a loss for what to look for next, 1696
                      Last edited by bkny; 04-06-2016, 05:30 PM.

                      Comment


                      • #12
                        Did you try to run cron.php manually in command line interface:
                        php cron.php
                        or
                        /usr/local/bin/php cron.php

                        Comment


                        • #13
                          Originally posted by yurikuzn View Post
                          Did you try to run cron.php manually in command line interface:
                          php cron.php
                          or
                          /usr/local/bin/php cron.php
                          yes, I went in via SSH, made my way to the CRM directory where the cron.php is, and executed via the command line syntax of "php cron.php"
                          You can see the system wait a moment, and return to the prompt. no errors no nothing.
                          I have it set up to check the personal email, and that's not happening either, so as you mentioned earlier, seems the cron.php isn't being run... it just doesnt seem to have an effect on the software.
                          I looked in the cron.php, and looked for the file it's calling for, and its where it's supposed to be, and in that looked for what its referencing and it's there.
                          I changed permissions to 754 for all 3 files, still NG.
                          1008

                          Comment


                          • #14
                            If there was delay it's a good sign. Anything in scheduled job's log? Try to run it one more time.

                            In crontab use php instead of /usr/local/bin/php

                            Comment


                            • #15
                              Originally posted by yurikuzn View Post
                              If there was delay it's a good sign. Anything in scheduled job's log? Try to run it one more time.

                              In crontab use php instead of /usr/local/bin/php
                              yes, a minor delay, 1-2 seconds or so before I get the prompt back.
                              I've set up a dozen test calls.
                              I've manually run " php cron.php " a few DOZENS of times via SSH, no new entries in the logs.


                              I will try the edit you mention above and see what happens.

                              Thank you.

                              1791

                              Comment

                              Working...
                              X