Results 1 to 9 of 9

Thread: Scheduler and Crontab

  1. #1
    Beefeater is offline Sugar Community Member
    Join Date
    Jan 2007
    Location
    Sydney
    Posts
    29

    Default Scheduler and Crontab

    SOS 4.2.1
    CentOS
    PHP Version 4.4.2

    Trying to get the scheduler to work.
    I can manually check mail with "check mail". Works fine for both pop3 and imap.
    Running cron.php through crontab, wget, lynx, firefox etc gives only this line (the FATAL line comes up when I go through a browser).

    Thu Feb 1 09:59:38 2007,974 [3233] DEBUG SugarCRM - --------------------------------------------> at cron.php <--------------------------------------------
    Thu Feb 1 09:59:38 2007,975 [3233] FATAL SugarCRM - If you see a whole string of these, there is a chance someone is attacking your system.

    At least give me some errors or something, getting tired of this.

    Ive been around on the forum but haven't found a solution yet.
    Please help me!

    EDIT:

    Ive taken one step forward. cron.php gets executed but it stops here
    Thu Feb 1 14:48:01 2007,490 [27478] DEBUG SugarCRM - Saving LAST_RUN for SchedulerJob [] using: [2007-02-01 14:48]

    Then nothing more.
    Last edited by Beefeater; 2007-02-01 at 02:57 AM.

  2. #2
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: Scheduler and Crontab

    check [sugar]/cache/modules/Schedulers/pid.php.

    I'm betting the permissions on that file do not match the creds apache runs with. remove the file and let the external crontab do its thing.

  3. #3
    Beefeater is offline Sugar Community Member
    Join Date
    Jan 2007
    Location
    Sydney
    Posts
    29

    Default Re: Scheduler and Crontab

    Quote Originally Posted by sugarchris
    check [sugar]/cache/modules/Schedulers/pid.php.

    I'm betting the permissions on that file do not match the creds apache runs with. remove the file and let the external crontab do its thing.
    I removed it. Didn't work.
    chmod 777 didn't work.
    Any other ideas?

    What is supposed to happen after
    Thu Feb 1 14:48:01 2007,490 [27478] DEBUG SugarCRM - Saving LAST_RUN for SchedulerJob [] using: [2007-02-01 14:48]
    ?
    Last edited by Beefeater; 2007-02-02 at 03:11 AM.

  4. #4
    Beefeater is offline Sugar Community Member
    Join Date
    Jan 2007
    Location
    Sydney
    Posts
    29

    Default Re: Scheduler and Crontab

    OK I'm getting
    [05-Feb-2007 15:45:01] PHP Fatal error: Call to a member function on a non-object in /opt/sugarcrm/htdocs/sugarcrm/data/SugarBean.php on line 779
    while cron.php is running.

    EDIT:
    Line 779
    $query .= $field."='".$GLOBALS['db']->quote(from_html($this->$field))."'";

    Code:
                                           // Try comparing this element with the head element.
                                            if(0 == $firstPass) $firstPass = 1;
                                            else $query .= ", ";
    
                                                    if(is_null($this->$field)) {
                                                            $query .= $field."=null";
                                                    }
                                                    else {
                                                    $query .= $field."='".$GLOBALS['db']->quote(from_html($this->$field))."'";
    Last edited by Beefeater; 2007-02-05 at 03:50 AM.

  5. #5
    Beefeater is offline Sugar Community Member
    Join Date
    Jan 2007
    Location
    Sydney
    Posts
    29

    Default Re: Scheduler and Crontab

    Problems solved.
    Replaced
    $query .= $field."='".$GLOBALS['db']->quote(from_html($this->$field))."'";
    with
    $query .= $field."='".$this->db->quote(from_html($this->$field))."'";
    in
    SugarBean.php on line 779.

    Now I just have to fix the rest..urgh.

  6. #6
    hkphooey is offline Sugar Community Member
    Join Date
    Jan 2007
    Posts
    94

    Default Re: Scheduler and Crontab

    Quote Originally Posted by sugarchris
    check [sugar]/cache/modules/Schedulers/pid.php.

    I'm betting the permissions on that file do not match the creds apache runs with. remove the file and let the external crontab do its thing.
    This solved it for me. I noticed that most files were owned by nobody root, where as the pid files and some of the containing directories were owned by nobody 476776747773. Hmmm.
    I did
    chown -R nobody:root [sugarcrmdir]/cache

    And things started happening. Only wasted three hours on that ...

  7. #7
    porus is offline Sugar Community Member
    Join Date
    Jan 2007
    Posts
    24

    Default Re: Scheduler and Crontab

    I have tried this. It is not working.


    Chris,
    Can you help us on this?

  8. #8
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: Scheduler and Crontab

    My suspicion is that there may be a regression introduced with 4.5.1b. Can those of you with problems post system specs, platform, and Sugar version?

  9. #9
    porus is offline Sugar Community Member
    Join Date
    Jan 2007
    Posts
    24

    Default Re: Scheduler and Crontab

    Chris,

    Thanks for quick response.

    The following are system spec:
    SugarOS 4.5.1
    Kubuntu 6.10 Edgy Eft
    Apache 2.0.55
    php 5.1.6
    Mysql

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 74
    Last Post: 2010-11-18, 11:22 PM
  2. Scheduler jobs not running
    By TheShark in forum Help
    Replies: 2
    Last Post: 2009-06-22, 03:53 AM
  3. Crontab Mac OS X
    By Danielg42 in forum Help
    Replies: 8
    Last Post: 2008-03-21, 05:36 PM
  4. Replies: 0
    Last Post: 2006-12-22, 02:40 PM
  5. Replies: 2
    Last Post: 2006-01-28, 07:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •