I’m working on a project right now that uses a PHP crontab to run a heavy script, and the problem I faced was the server kept timing out because by default PHP has a time limit for script execution.
There’s an easy way around this by adding the following line of code to the top of your php code. It simply overrides the maximum execution time for the script.
ini_set('max_execution_time', 600); //600 seconds, you can change this to what ever you like
Designer and web developer, Co-founder and Technical Director at Harkable.com London. Previously I worked at InMobi, Spotify and MySpace. Interests include photography and making short videos. Also an avid F1 fan. I also run Mega Infographics for your daily dose of the best infographics.
Follow us on Twitter and get in-stream updates.
Subscribe to all the Papermashup tutorials and articles straight to your RSS reader.
Sign up and get all the Papermashup tutorials straight to your inbox.