开发者

How to execute a very large cron in PHP/Linux environment

开发者 https://www.devze.com 2023-01-06 02:01 出处:网络
Hi here\'s my problem. I need to transfer a large amount of data (hits) from Redis to Mysql everyday. I can\'t use daily cron, because it\'ll timeout due to the large amount of data transferred a开发者

Hi here's my problem. I need to transfer a large amount of data (hits) from Redis to Mysql everyday. I can't use daily cron, because it'll timeout due to the large amount of data transferred a开发者_C百科t one go. Anyone got any idea / solution they implemented to this problem?


What will time out? There aren't any timeouts built into cron.

If you're running a PHP script, and that is timing out, then perhaps you need to adjust the timeout settings for PHP scripts?

ini_set("max_execution_time", 0);

This will disable script timeout for the current executing script (as long as you're on a host which allows you to do so).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号