To be simple:
ini_set("max_execution_time") works when I call script.php via classic URL call
ini_set("max_execution_time") doesn't works when script.php is run via exec() function from another php script/process.
Now, my solution is not simply to relay on option 1 because it works, since exec() function that is about to activate script.php and few similar ones is called via (external) cron job.
Does anyone have idea what's happening?
If it's from help below is activating code:
exec('/usr/bin/env php ./script.php');
sleep(30);
exec('/usr/bin/env php ./script2.php');
which activates both script and script2.php and both of them fails when ini_set() returns FALSE.