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 - Fatal error: Maximum execution time of 30 seconds exceeded

Discussion in 'General Discussion' started by torres87, Oct 3, 2008.

  1. torres87

    torres87 Registered

    Oct 3, 2008
    Likes Received:
    Trophy Points:
    I've got a php script which copies a csv file from the internet onto my server (webhost), and it runs fine when I simply visit the URL. It takes about a minute.

    I had to edit the .htaccess to set the php_value max_execution_time parameter to over 30secs to get it to work, however. It's set to something like 5 mins now.

    When I set the job to run via cron jobs I get the following error:

    Fatal error:  Maximum execution time of 30 seconds exceeded
    I can see the script has started but it exits because of this error when it is half way through.

    The cron command I am using is:

    php -f /home/myfolder/public_html/admin/updatestock.php
    There is nothing wrong with my script, it's just with the php config it seems.

    Can anyone help?


Share This Page