![]() |
Running controller from command line using CLI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Running controller from command line using CLI (/showthread.php?tid=8629) |
Running controller from command line using CLI - El Forum - 05-25-2008 [eluser]rankorn[/eluser] I have a CI application and I want to run some code from a CRON job. The solution I am thinking of is to call the PHP CLI interface as the CRON job, and run a part of my application. I want to use the CI framework since the job requires my models and some more CI libraries. I have found a nice way to run controller from CLI on one of the threads, and it works fine except for a small problem I have on Windows. This is the cli.php that I call from CLI to ignite my controller: Code: <?php It seems that on windows, when I try to invoke the parent constructor from my controller, it fails without any shown error, and the script just dies. This DOES NOT happen on my linux machine. I managed to track the exact problem to calling the base constructor. I have found that all the classes are loaded and that it is not an include_path problem. Any ideas? Ran. |