running script from command line - 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: running script from command line (/showthread.php?tid=51806) |
running script from command line - El Forum - 05-18-2012 [eluser]jordantkj[/eluser] Hi, I'm planning on using crontabs to run a php script daily. I created a second controller and added a special route, so if my path is <b>//localhost/ci/index.php/autoupdate</b> it will access the new class controller and run an update function. This works. My issue is that I don't know how to do the same thing from the command line. I tried the following by adding autoupdate as an argument, but it did not work. The autoupdate controller works in the browser, so I know the controller is fine and its not some typo. Is this possible? Am I doing something wrong? Code: C:\>C:\wamp\bin\php\php5.3.8\php.exe -f C:\wamp\www\ci\index.php -- -autoupdate Thanks running script from command line - El Forum - 05-18-2012 [eluser]weboap[/eluser] check : http://ellislab.com/codeigniter/user-guide/general/cli.html Note: it will help you to add "C:\wamp\bin\php\php5.3.8\" to the environment Path you can use php right a way without specifying the path again. http://windows.fyicenter.com/view.php?ID=60 |