I have a script that has to communicate with multiple websites via cURL, and the time it takes to execute this is rather long. It is so long, in fact, that the server sometimes TIMES OUT the process before it is completed. The solution I thought of was to change the HEADER and go to a new .php file to communicate with each different website. Therefore, it would look like multiple small processes to the server rather than one large one. But I have a problem: This process needs to be called via a CRON JOB at certain time intervals. Will a CRON JOB continue with wherever the HEADER points to, or does it simply stop the process? Note: I tried changing the SET_TIME_LIMIT option via PHP on the server, but they have that feature locked at 10 seconds. Note: I can set the TIMEOUTs for my CRON JOBs to whatever, so I'm not really concerned about the overall length of the entire process (around 10-15 seconds).
It depends on how you start your cron jobs. You can just use the path to the php file which I doubt would function correctly with changing the header or you can use a command like wget example.com/script.php to run the job which would probably follow the new headers correctly. Note: I have had luck extending the time limit using ini_set(), have you tried that?