Cron problem |
[eluser]Ajaxian64[/eluser]
Hi all, I've update my web app from CI 1.7.x to 2.0 Before this upgrade, my cron task worked fine but since Ci 2.0 then it doesn't work Code: // Emulate the http request Is there something changed in CI 2.0 regarding this ?
[eluser]InsiteFX[/eluser]
Some one posted this the other day and had the same problem. This is how they said it worked for them in CI 2.0.1. You can search the forum for it. Code: /usr/bin/php index.php welcome cron InsiteFX
[eluser]Ajaxian64[/eluser]
I read the post but I don't know where is the solution I use a cron.php in which I set the lines I have given previously AND I'm totally unable to know where I shall put the Code: /usr/bin/php index.php welcome cron This is what I have in my cron.php Code: define('CRON_CI_INDEX', 'path/www/index.php'); // Your CodeIgniter main index.php file Code: /usr/bin/php index.php welcome cron
[eluser]Ajaxian64[/eluser]
When I did Code: $_SERVER['AUTO'] = '/freedom/freeMe'; When I use instead Code: $_SERVER['REQUEST_URI'] = '/freedom/freeMe'; Code: <h4>A PHP Error was encountered</h4> Entirely lost the Ajaxian boy ... Up to you is it due to server ? cron.php which may be bad, attack from Mars?
[eluser]Unknown[/eluser]
Use the below command in the cpanel cron command section lynx -dump http://siteurl/cron.php Place the below cron.php in the root folder #!/usr/local/bin/php <?php $_SERVER['REQUEST_URI'] = '/controller_name/function_name'; require 'index.php'; ?> You can add the cron functions in the specified controller and that function will execute if you call the cron.php script in the root Hope this may help for the cgi Server |
Welcome Guest, Not a member yet? Register Sign In |