The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cron Job not working

Discussion in 'General Discussion' started by mehtalalit, Oct 29, 2009.

  1. mehtalalit

    mehtalalit Registered

    Joined:
    Oct 29, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have the following jobs configured to run every 15 minutes
    0,15,30,45 * * * * . /home/decimal/sms_engine/OutSmsProcessor.sh
    0,15,30,45 * * * * . /home/decimal/sms_engine/InSmsProcessor.sh

    when i run these commands from command line they run fine and processing happens as expected. The cron log shows that these jobs are running fine

    command tail /var/log/cron shows the following

    Oct 29 03:45:01 services crond[7416]: (decimal) CMD (. /home/decimal/sms_engine/InSmsProcessor.sh)
    Oct 29 03:45:01 services crond[7419]: (decimal) CMD (. /home/decimal/sms_engine/OutSmsProcessor.sh)

    In spite of this no processing is being done by the program.

    Could someone please help

    Thanks a ton in advance.
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I would try changing how the script is executed from the crontab; specifically, for a shell script I would change the period to "sh" like the following example:
    Code:
    sh /path/to/script.sh
     
  3. mehtalalit

    mehtalalit Registered

    Joined:
    Oct 29, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Don, I have tried them all

    Thanks Don. I have tried "sh" as well as "bash". This doesn't seem to help. My script looks like this
    _______________
    #!/bin/bash
    cd /home/decimal/sms_engine/
    export CLASSPATH=$CLASSPATH:/home/decimal/sms_engine/lib/mysql-connector-java-5.0.8-bin.jar:/home/decimal/sms_engine/
    java -Xms64m -Xmx64m -Xss512k OutSmsProcessor
    ______________

    and crontab entry is

    */15 * * * * sh /home/decimal/sms_engine/OutSmsProcessor.sh

    Any more thoughts??
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I would check with the software vendor that created the custom script or Java application within the "sms_engine" directory; they may be more familiar with the specific configuration requirements and symptoms involved relating to their product.
     
Loading...

Share This Page