문제

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