Frage

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.

War es hilfreich?

Lösung

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!");
    }
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit magento.stackexchange
scroll top