开发者

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

  1. running from web ......... [WORKS]
  2. running testA function WITHOUT model import from cmd line......... [WORKS]
  3. 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/)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜