Hey,

I forgot to paste the code for my cron:

Cron Shell:
class StatisticsShell extends Shell {

    var $uses = array('User');
    /**
     * Send just one email
     *
     */
    function emailme() {
        $users = $this->User->find('all');
        App::import('Core', 'Controller');
        App::import('Component', 'Email');

        $this->Controller =& new Controller();
        $this->Email =& new EmailComponent(null);
        $this->Email->Controller = $this->Controller;

        $this->Email->to = 'Erich <[email protected]>';
        $this->Email->subject = 'Testing the cron...';
        $this->Email->replyTo = '[email protected]>';
        $this->Email->from = 'Cron Mailer <[email protected]>';
        $this->Email->charset = 'UTF8';
        $this->Email->template = 'statistics';
        $this->Email->sendAd = 'both';
        $this->Controller->set(compact('users'));
        $this->Email->send();
        return;
    }

}

And the cron command which is run by the server:
/usr/www/users/xxx/dev/cake/console/cake -app "/usr/www/users/xxx/dev/
app" statistics emailme

This calls the cake shell and fires the code of the emailme-function.
Emails are sent without any problems. But as soon as I try to init any
model, the error from above is show in the console window of my
crontab.

:(

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to