CodeIgniter Forums
Real-time output through CLI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Real-time output through CLI (/showthread.php?tid=30195)



Real-time output through CLI - El Forum - 05-06-2010

[eluser]Unknown[/eluser]
I'm building a background cron script to handle some slow processing, and using codeigniter to handle the database lifting etc.

However, it seems when I run the scripts it waits until the entire script has run before it outputs any text (even using echo statements).

I was hoping to get a more real-time output to make debugging slightly less painful - is this a simple switch I can run?


Real-time output through CLI - El Forum - 05-06-2010

[eluser]WanWizard[/eluser]
Normal CI output is buffered, so you can't use that in a cron situation.

Search for cron here, there are libraries available (from p.e. Phil) that work around this issue.