Results 1 to 10 of 10

Thread: cron job not working

  1. #1
    seanpeace is offline Senior Member
    Join Date
    May 2009
    Posts
    20

    Default cron job not working

    I keep getting these errors in my Sugar Log and the scheduler is not working.

    Sugar Log

    Mon Jul 27 11:18:02 2009 [16168][1][FATAL] ----->Scheduler Job FAILED

    Here is my crontab file

    # /etc/crontab: system-wide crontab
    # Unlike any other crontab you don't have to run the `crontab'
    # command to install the new version when you edit this file
    # and files in /etc/cron.d. These files also have username fields,
    # that none of the other crontabs do.

    SHELL=/bin/sh
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

    # m h dom mon dow user command
    * * * * * root cd /var/www/seanpeace/data/www/songvest.com/Sugar; php -f cron.php > /dev/null 2>&1
    17 * * * * root cd / && run-parts --report /etc/cron.hourly
    25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
    47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
    52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
    #

    I also went to the command line, went to the directory Sugar and put in the command

    php -f cron.php > /dev/null 2>&1

    and I got the error

    -bash: syntax error near unexpected token `newline'

    Also, my schedules are all active. Specifically is was not sending out the campaign emails this morning.

    Run Nightly Mass Email Campaigns On the hour; From 02:00AM to 06:00AM 01/01/2005 01:00AM - 12/31/2020 12:59PM Active

    any help is appreciated.

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: cron job not working

    Hi Sean

    Did you run this command "cd /var/www/seanpeace/data/www/songvest.com/Sugar"

    Before running this one "php -f cron.php > /dev/null 2>&1"?

    The error message does not look like a trivial php error message.
    Did you customize any sugar script, installed any upgrade patch or package?

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    seanpeace is offline Senior Member
    Join Date
    May 2009
    Posts
    20

    Default Re: cron job not working

    No, I have not done anything custom and any upgrades where run via the upgrade manager in the admin.

    Also, yes, I was in the right directory.

    I did just try this command.

    php -c /usr/lib/php/php.ini -f cron.php

    and there were no errors, but when I run

    php -c /usr/lib/php/php.ini -f cron.php > /dev/null 2>&1

    I get the same error

  4. #4
    seanpeace is offline Senior Member
    Join Date
    May 2009
    Posts
    20

    Default Re: cron job not working

    Ok, I checked where my php.ini is to confirm and it was wrong.

    Here is the correct path. Although it still doesn't work. I have Debian Linux


    cd /var/www/seanpeace/data/www/songvest.com/Sugar; php -c /etc/php5/apache2/php.ini -f cron.php > /dev/null 2>&1

  5. #5
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: cron job not working

    What is the output if you run only:

    php -c /usr/lib/php/php.ini -f cron.php

    or

    php -f cron.php

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  6. #6
    seanpeace is offline Senior Member
    Join Date
    May 2009
    Posts
    20

    Default Re: cron job not working

    When I run

    php -c /etc/php5/apache2/php.ini -f cron.php

    I don't get any errors. I have put that into the cron job and it is still giving me the errors.

    How can I test it?

  7. #7
    seanpeace is offline Senior Member
    Join Date
    May 2009
    Posts
    20

    Default Re: cron job not working

    Here is the email I got today from the cron job with the error

    /bin/sh: line 1: 1622 Bus error php -c /etc/php5/apache2/php.ini -f cron.php > /dev/null 2>&1

  8. #8
    sarita_1 is offline Junior Member
    Join Date
    Oct 2011
    Posts
    8

    Default How to implement Scheduling by using Crontab

    Hello,

    I am very new in sugarcrm and want to use crontab for scheduling.
    I want to send mail to all the contacts in my Sugarcrm account in the interval of 10 or 15 minutes.
    Can anybody help me out with all the steps in detail.
    Thanks in advance

  9. #9
    sarita_1 is offline Junior Member
    Join Date
    Oct 2011
    Posts
    8

    Question Re: cron job not working

    Can anybody tell me how to implement Email scheduling using crontab?
    I haven't got any answer.
    Its very urgent.
    Please reply,I am not able to work further without this.

  10. #10
    iqbalmp is offline Sugar Community Member
    Join Date
    Jan 2010
    Location
    cochin
    Posts
    26

    Default Re: cron job not working


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Scheduler not working (cron.php hangs)
    By beyondsecurity in forum Help
    Replies: 1
    Last Post: 2008-09-24, 12:28 PM
  2. Cron Job
    By kevpool1 in forum Help
    Replies: 1
    Last Post: 2007-03-29, 06:48 PM
  3. how to cron tab?? HELP PLEASE!!!
    By aashish in forum Help
    Replies: 2
    Last Post: 2006-02-20, 08:44 AM
  4. cron job not working
    By nkendrick in forum General Discussion
    Replies: 5
    Last Post: 2006-02-03, 09:20 AM

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
  •