Set max_execution_time in PHP CLI

I know that PHP CLI is usually used because of none time limits and primary because it is not using Apache threads/processes.

But is there any way how to explicitly set the max_execution_time for some scripts which i don't want to have the freedom of "unlimited time" and just want to keep those script under control?

If you think this question may be better answered on superuser.com and have permission to move it, do it. :)

Edit: I've been Googling a bit and found the right parameter:

php -d max_execution_time=5 script.php
42
задан Radek Simko 3 May 2011 в 20:11
поделиться