Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How do I set up a new cron job ? 
 
Georges@Bitbol
Sr. Member
 
Avatar
Total Posts:  104
Joined:  2008-08-07
Paris, France
 

Hi all,

I have setted up a new cron job this way.
* php crontab : every minute, the magento cron.php file is executed
* in my_namespace/customer/etc/config.xml, I have added

<config>
    ...
    <
crontab>
        <
jobs>
            <
customer_papers_pending>
                <
schedule>
                    <
cron_expr>*/* * * *</cron_expr>
                </
schedule>
                <
run>
                    <
model>Customer_observer::pendingPapersCheck</model>
                </
run>
            </
customer_papers_pending>
        </
jobs>
    </
crontab>
</
config>
* All is working well. Schedule is saved in cron table and well executed.

EXCEPT, the model called is not the one from my namespace. It called Mage Customer Observer Model and not the one from my namespace.
I tried to set MyNamespace_Customer/observer in xml but cron is looking for : Mage/MyNamespace/Customer ...

Does anyone has an idea where I forgot stuff ?

Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Georges@Bitbol
Sr. Member
 
Avatar
Total Posts:  104
Joined:  2008-08-07
Paris, France
 

Ok, I forgot to add model rewirte in config.xml.

I added this step in wiki page.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bmann
Jr. Member
 
Total Posts:  14
Joined:  2009-05-01
 

could you post an example of this rewrite .. it would be greatly appreciated

 
Magento Community Magento Community
Magento Community
Magento Community
 
bmann
Jr. Member
 
Total Posts:  14
Joined:  2009-05-01
 

got it figured out.. thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top