Domanda

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.

È stato utile?

Soluzione

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!");
    }
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top