سؤال

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.

هل كانت مفيدة؟

المحلول

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!");
    }
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top