First off, Magento's default cron handling is (nicely put) a little strange. Please have a look at the Aoe_Scheduler (https://github.com/AOEpeople/Aoe_Scheduler), which provides a very convenient user interface and helps you find possible errors in your setup more easily. In addition, it comes with a custom shell script that you can extend to your needs.
I mention the Aoe_Scheduler as it handles potential deadlocks that might occur in vanilla Magento cron setup better. We've experienced deadlocks with cron jobs in Magento in the past for commands that might exceed defined timeouts. Aoe_Scheduler fixed these issues.
If you are trying to create an EAV entity, you need a record for that entity in the eav_entity_type
table.
This needs to be inserted when the module is installed.
For this you need to make your install-0.1.0.php
look like this:
<?php
//you might want to create tables here also
$this->installEntities();
your config.xml
should contain this under the global
tag
<resources>
<complex_setup>
<setup>
<module>Eav_Complex</module>
<class>Eav_Complex_Model_Resource_Setup</class>
</setup>
</complex_setup>
</resources>
and your class Eav_Complex_Model_Resource_Setup
should contain this method:
public function getDefaultEntities(){
$entities = array();
$entities['complex_complexpost'] = array(
'entity_model' => 'complex/complexpost',
'attribute_model' => 'complex/resource_eav_attribute', //this might not be needed
'table' => 'complex/complexpost', //might not be needed
'additional_attribute_table' => 'complex/eav_attribute', //might not be needed
'entity_attribute_collection' => 'complex/complex_attribute_collection',
'attributes' => array( //list here all your entity attributes
'title' => array(
'group' => 'General',
'type' => 'varchar',
'backend' => '',
'frontend' => '',
'label' => 'Title',
'input' => 'text',
'source' => '',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'required' => '1',
'user_defined' => false,
'default' => '',
'unique' => false,
'position' => '10',
'note' => '',
'visible' => '1',
'wysiwyg_enabled'=> '0',
),
),
);
return $entities;
}
I hope I've closed all the brackets and parentheses.
You will end up with a bunch of new errors after this because you have a log of files still missing, but it should solve your entity type problem.
For a full description on how to create an eav entity, check this question: How to create an EAV entity?
Best Answer
Check out, the document
I guess that you have added cron from cpanel
In order to
php bin/magento cron:install
First, your current Cli user have any record at crontab. So, Check existing cron list using below code
You have to add magento cron