Part of the EllisLab Network
This thread is a discussion for the wiki article: Cron job bootstrapper
   
5 of 5
5
Cron job bootstrapper
Posted: 29 February 2012 05:36 AM   [ Ignore ]   [ # 61 ]  
Summer Student
Total Posts:  1
Joined  02-29-2012

I tried to use this for my cron but it reports “Could not open input file: /var/www/vhosts/mydomain.com/httpdocs/backup/cron.php”

Any Ideas?

Profile
 
 
Posted: 16 March 2012 12:14 PM   [ Ignore ]   [ # 62 ]  
Summer Student
Total Posts:  2
Joined  03-16-2012
marcoslavorato - 05 March 2009 08:00 PM

Hi for all. I am tryibg to do work the boostrapper but I have a problem. When I execute by cronjob (code) in output it shows the 404 error. Why? The controller name and the function (code 2) is correct.


In my config file (code 3) I omit the index.php - maybe this is the problem?

/usr/bin/php -/home/domain.com/html/cron/cron.php --run=/paginas_controller/gerador 
/home/webadmin/domain.com/html/index.php 
$config['index_page'""

I had this same problem this morning. The problem is (in my case) that CI thinks ‘—run=’ is part of the URI and when it validates it in the router (/system/core/Router.php) it throws it out.

In the _validate_request method, I included the following code after the segment count statement at the beginning of the method:

if($segments[0] == '--run=')
{
   $resegment 
= array();
   for(
$i=1;$i<count($segments);$i++)
   
{
      $resegment[] 
$segments[$i];
   
}
   $segments 
$resegment;
Profile
 
 
Posted: 16 March 2012 12:15 PM   [ Ignore ]   [ # 63 ]  
Summer Student
Total Posts:  2
Joined  03-16-2012
Cool Developer - 29 February 2012 05:36 AM

I tried to use this for my cron but it reports “Could not open input file: /var/www/vhosts/mydomain.com/httpdocs/backup/cron.php”

Any Ideas?

Sounds like permission issues. Did you change the permissions on cron.php to be executable?

Profile
 
 
   
5 of 5
5
 
‹‹ PayPal Lib      css ››