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