Use own component in cronjob

Hey guys,

i use a own component in my yii2 application. It works fine. But when i call a model function from my cronjob Controller, the component generates an error:

Exception 'yii\base\UnknownPropertyException' with message 'Getting unknown property: yii\console\Application::SysFunc'

SysFunc is my component. Is there any way to use the component with my Cronjob Controller? Here is the code from my CronJob Controller:

<?php

namespace app\commands;

use Yii;
use yii\console\Controller;
use app\models\Scans;
use app\models\MailOutgoingSpooler;

/**
 * cronjob controller
 */
class CronjobController extends Controller {

Thanks for help…

I solved the problem. I must config the component in the /config/console.php. Now it works.