Max_execution_time unlimited on CLI ?


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?

Mr. Goodie2Shoes

Well-known member
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.


Well-known member
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.