1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Max_execution_time unlimited on CLI ?

Discussion in 'XenForo Development Discussions' started by Marcus, Feb 9, 2015.

  1. Marcus

    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?
  2. Mr. Goodie2Shoes

    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.
  3. Marcus

    Marcus 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.

Share This Page