kohana 3 - Kohana3 method invocation from CRON - despite proper routes, always redirected to user/login -
i have such problem running methods in kohana3 cron.
the situation follows
1) have set (proper ?) cron jobs in cpanel:
php /home/myuser/public_html/index.php --uri=mycontroller/mymethod
2) have set (proper ?) routes in bootstrap.php:
route::set('myroute', 'mycontroller/mymethod') ->defaults(array( 'controller' => 'mycontroller', 'action' => 'mymethod' ));
3) globally, app uses auth mycontroller written in such way, can manually access methods webbrowser without need log in.
my problem proper methods not invoked cron. instead, receive cron reports email, stating invocation redirected user/login...
status: 302 found x-powered-by: php/5.2.17 set-cookie: session=2a41c5efa2a25efb0c698136abb174f5; path=/ location: http://myserver/~myuser/user/login content-type: text/html; charset=utf-8
to honest, out of ideas - might cause , fix? me ? in advance!
regards,
peter
i decided change approach.
- i created cron.php file in kohana root folder
- the file contains curl invocations of controllers/methods need
- cron invokes cron.php file rather controllers/methods directly
all working fine now.
Comments
Post a Comment