View Full Version : cron & timeouts

11-01-2006, 05:13 PM
My understanding of running php scripts under cron was that they weren't subject to the normal php script timeout. Is this not the case?

I have, in the past, run scripts that must have taken a few minutes at least, but a cron job I ran today said it timed out after 30 seconds.

Please someone set me straight - If you want to run an autonomous and long-running process can you use cron & php?

11-01-2006, 05:21 PM
I always assumed cron didnt time out - I thought the time out was php/browser defined?

How do you know it timed out? Is there some sort of logging going on? I only ask as I am setting up some pretty hefty cron scripts at the moment!

11-02-2006, 09:23 AM
The php script running has error reporting enabled. The email sent by cron includes the php message that the maximum execution is exceeded.

So it's the php script that is timing out, but I thought it wouldn't do so when run under cron.

Am I wrong?