Welcome Guest, Not a member yet? Register   Sign In
How to run php script with command line? (For e.g Cron Files)
#1

[eluser]web_developer[/eluser]
Hello,

There are some php script, which I need to run from command line. And also some script which I need to set in Cron. So I just want to know Where Can I save that files? and how to execute it?
#2

[eluser]face1m[/eluser]
Hi. Its just a guess, but i load my php files in the web directory and run them from the browers. You should get the cron directory from your hosting provider along with instructions on file naming conventions. Hope this was of some help.
#3

[eluser]haydenk[/eluser]
You can save it wherever you like, to execute it though...
Quote:/usr/bin/php your_php_file.php
#4

[eluser]web_developer[/eluser]
In live, I am using CI, in my cron script I want to use CI and my own library. So I think, it must be save in some controller? or any other folder? If I save cron code in controller then how can I execute from command line? I hope now you got it my exact question.
#5

[eluser]pistolPete[/eluser]
Did you read the wiki entries?
http://codeigniter.com/wiki/Category:Config::Cron/




Theme © iAndrew 2016 - Forum software by © MyBB