1

Have a cronjob in my extension config.xml file but seems do not run and function don't load

What is wrong here??

config.xml :

<?xml version="1.0"?>
<config>
    <global>
        <models>
            <mymodule>
                <class>Mycompany_Mymodule_Model</class>
            </mymodule>                         
        </models>
    </global>
    <crontab>
        <jobs>
            <mycompany_mymodule>
                <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
                <run><model>mymodule/observer::myFunction</model></run>
            </mycompany_mymodule>
        </jobs>
    </crontab>
</config>

And in Observer.php

public function myFunction() 
    {
        ....            
        ....
        ....
    }

Also added cron to server in Directadmin panel :

*/5 * * * * /usr/bin/wget -O /dev/null http://www.mydomain.com/cron.php

and

*/5 * * * * wget -q http://www.mydomain.com/cron.php

When I run cron.php from URL directly, it work and function load!

1

solved! , changed the server command to :

*/5 * * * * wget -O /dev/null http://www.mydomain.com/cron.php

and this solved my problem

| improve this answer | |
  • I can not, must wait for 20hrs from now! – sIiiS Apr 11 '14 at 11:55

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.