One more question regarding this. After adding the hook as mentioned above, in the run() method of the main file of the extension, I've used within the callback function a method from a model as follows:
Yii::app()->hooks->addAction('console_command_hourly_after_process', function(){...