cakephp: HELP: cron_dispatcher 1.3 failes on import plugin models
I can't seem to import a plugin model when running controller from the cron_dispatcher. Here is a simple test result.
ver: 1.3.2 cron_dispatcher: http://tricks.cakephp.in.th/comland-line-and-cronjob
- running from web ......... [WORKS]
- running testA function WITHOUT model import from cmd line......... [WORKS]
- running testB function WITH model import from cmd line......... [FAILED] - No errors given
code:
class CronsController extends PluginAppController {
var $uses = array();
function testA()
{
echo 'Working';
die;
}
function testB()
{
App::import('Model', 'Plugin.Report');
$r开发者_开发知识库eport = new Report();
echo 'Working';
die;
}
Hmmmm. I wonder if a shell would work better? (http://www.utoxin.name/2009/07/cakephp-shells-and-cron-jobs/)
精彩评论