Welcome Guest, Not a member yet? Register   Sign In
running script from command line
#1

[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
#2

[eluser]weboap[/eluser]
check :
http://ellislab.com/codeigniter/user-gui...l/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




Theme © iAndrew 2016 - Forum software by © MyBB