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 Jobs - Not Performing Them :-(

Discussion in 'General Discussion' started by Mick007, Feb 28, 2008.

  1. Mick007

    Mick007 Well-Known Member

    Joined:
    Oct 31, 2004
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Hi Guys,

    Need a little help here please. Iv setup a cron job to run every 5mins. Yea i know, EVERY 5MINS. But it has to be ran every 5 mins because of the service i offer.

    Iv put the details as this:

    php -q /home/tosms/public_html/autosms/check_email.php

    and done it for every 5mins but it just doesnt seem to run it. I also dont get any email from the log of the cron.

    Can anyone help me out please.
     
  2. dwh2

    dwh2 Well-Known Member

    Joined:
    Jan 14, 2004
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    What happens when you run it from the command line? Does it work?
    Make sure you try it from the command line as the same user that will run the cron.
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    try using the fully-qualified path to the PHP binary.
     
  4. HostIt

    HostIt Well-Known Member

    Joined:
    Feb 22, 2003
    Messages:
    151
    Likes Received:
    1
    Trophy Points:
    18
    Also, be sure you have actually set it correctly to run every 5 minutes.

    I only say this because I just had the identical problem myself. After some digging around I discovered that at some point I had accidentally set the "hour" number also. The combination I had given meant that the cron job never ran. To be sure, your cron job should look something like this (or with the full path to php as suggested by cpanelkenneth):

    */5 * * * * php -q /home/tosms/public_html/autosms/check_email.php
     
    #4 HostIt, Mar 2, 2008
    Last edited: Mar 2, 2008
Loading...

Share This Page