开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜