Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

    Joined:
    Oct 3, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    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:

    Code:
    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:

    Code:
    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?

    Thanks
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice