0

I have configured my module with cron like this:

app/code/local/MyModule/MyImport/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <MyModule_MyImport>
            <version>0.0.1</version>
        </MyModule_MyImport>
    </modules>
    <global>
        <models>
            <mymodulemyimportcron>
                <class>MyModule_MyImport_Model</class>
            </mymodulemyimportcron>                         
        </models>
    </global>
    <crontab>
        <jobs>
            <mymodulemyimportcron>
                <schedule>
                    <cron_expr>*/5 * * * *</cron_expr>
                </schedule>
                <run>
                    <model>mymodulemyimportcron/observer::test</model>
                </run>
            </mymodulemyimportcron>
        </jobs>
    </crontab>
</config>

app/etc/MyModule_MyImport.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <MyModule_MyImport>
            <active>true</active>
            <codePool>local</codePool>
        </MyModule_MyImport>
    </modules>
</config>

app/code/local/MyModule/MyImport/Model/Observer.php

<?php

/**
 * Class MyModule_MyImport_Model_Observer
 */
class MyModule_MyImport_Model_Observer
{
    public function test()
    {
        Mage::log("MyModule MyImport works!");
    }
}

?>

I have configured a trigger for cron.php on my webserver which runs every 5 minutes. When I trigger this (or it runs automatically), then I got no log entry from my module and nothing else...

I have seen, that the other cron for Google Export does not run, too. But this worked months ago..

How can I find the error? What I have to do?

please help

  • Your code looks fine in first go. Try to check if other cron runs or not. I think the issue is different. – Sukumar Gorai Sep 6 '18 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.