Closed Thread
Results 1 to 3 of 3

Thread: Is my cron facility on ?

  1. #1
    stevon is offline x10Hosting Member stevon is an unknown quantity at this point
    Join Date
    Feb 2010
    Posts
    4

    Is my cron facility on ?

    Hi
    I installed a cron script, which is meant to trigger a php file.
    I set cPanel to email each time but i get nothing.

    how can i tell if cron is activated for me?

    steve

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: Is my cron facility on ?

    A cron command like:

    Code:
    /usr/bin/php /home/igor/public_html/my_cron_script.php >>/home/igor/public_html/my_cron_log.txt 2>&1
    will log system error messages and any output ( print or echo commands).

    Adding lines like

    PHP Code:
    date_default_timezone_set('America/Los_Angeles');
    echo 
    "\nCron job run on: " ;
    echo 
    date('l jS \of F Y h:i:s A'); 
    echo 
    "\n"
    will give you a time stamp in the log file.

    The email notification system on the cPanel screen for cron jobs has been turned off (it would flood the email server).

    Note: PHP mail() under cron does not work, period. The above logging should show you the error message.

    And remember, you cron jobs must be 5 minutes apart. Otherwise the system will quietly delete them.
    Nothing is always absolutely so.

  3. #3
    stevon is offline x10Hosting Member stevon is an unknown quantity at this point
    Join Date
    Feb 2010
    Posts
    4

    Re: Is my cron facility on ?

    thats marvelous! thanks. works perfectly.

    a small question.
    i have a small site that stores user data to mysql, once an hour, i wanted to be notified if there was new data that had been written to the db.

    what do you think i should be looking at to get this achieved.

    regards

    §teve

Closed Thread

Similar Threads

  1. Replies: 6
    Last Post: 11-14-2009, 06:38 PM
  2. Replies: 4
    Last Post: 10-26-2009, 04:09 AM
  3. [Suggestion] Add a cron test facility
    By ah-blabla in forum Feedback and Suggestions
    Replies: 0
    Last Post: 10-18-2009, 08:53 AM
  4. [cron problem]php-cron command not found
    By N4rk0 in forum Free Hosting
    Replies: 1
    Last Post: 01-31-2008, 11:51 AM
  5. Free post facility ?
    By holeepassion in forum Free Hosting
    Replies: 5
    Last Post: 11-09-2007, 06:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers