Max_execution_time unlimited on CLI ?

Marcus

Well-known member
I need to run some longer scripts which may take up to an hour.

I remember xenforos CLI installer does not need to be "re-exexuted" in order to continue its task. Is it safe to run them on CLI?

Is the maximum execution time there unlimited (until the php service is stopped).

Or is it more convenient to let them run in a deferer class?
 
PHP CLI's max execution time is hard coded to 0 which means unlimited :)
Calling the deferred process via HTTP means extra TCP headers which means more resource usage (though it's comparatively low :P)

If you have the ability to go for a CLI execution I would say go for it.
 
Thanks for your reply. I think placing functionality in the acp is looking really nice, that's definitely nicer than using CLI when you use that script more than once. But it's interesting that the CLI does not have any execution time limit, I didn't know about that. That is a huge advantage of CLI.
 
Top Bottom