Pergunta

I am trying to set a cronjob for export order to another website in Magento 1.9.3

please, anyone, have an idea then plz share it with me.

Foi útil?

Solução

In your modules config.xml put the following:

<config>
    <global>
        <models>
            <dolphininvoicecron>
                <class>Dolphin_Invoice_Model</class>
            </dolphininvoicecron>                         
        </models>
    </global>
    <crontab>
        <jobs>
            <rdolphininvoicecron>
                <schedule>
                    <cron_expr>*/10 * * * *</cron_expr>
                </schedule>
                <run>
                    <model>dolphininvoicecron/cron::setStatus</model>
                </run>
            </dolphininvoicecron>
        </jobs>
    </crontab>
</config>

In app/code/local/Dolphin/Invoice/Model/Cron.php add the following:

<?php
class Dolphin_Invoice_Model_Cron {
    public function setStatus() {
        Mage::log("WORKS!");
    }
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top