How do you get a Cronjob executing a PHP script to run longer than 30 seconds?

前端 未结 6 1921
梦谈多话
梦谈多话 2021-01-20 18:10

How can I rewrite this into a cron that will run every day for longer than 30 seconds? Also, do I need to edit the .htaccess or php.ini file in the

6条回答
  •  情话喂你
    2021-01-20 18:30

    You could also use ini_set('max_execution_time', 60)

    But as the manual page says, in some cases (i.e. running in safe mode) this will have no effect at all: http://uk.php.net/manual/en/info.configuration.php#ini.max-execution-time

    It could also be possible that the php.ini for client line has different max execution values than for the browser. I have seen it sometimes.

提交回复
热议问题