Magento Cron is not run on windows

by wuang li   Last Updated March 20, 2016 08:03 AM

I want to run the cron job on magento, but the cron events are not appeared. This is my etc/config.xml file.

<crontab>
    <jobs>
         <imagerecycle_imagerecycle>
            <schedule>
                <cron_expr>*/1 * * * *</cron_expr>
            </schedule>
            <run>
                <model>imagerecycle/observer::cronexec</model>
            </run>
         </imagerecycle_imagerecycle>
    </jobs>
</crontab>

And I define the cron event ovserver function.

class Imagerecycle_Imagerecycle_Model_Observer {

  public function cronexec($observer){

    // do something

  }
}

And to run the cron I use such a command line at the command prompt.

D:\work\magento>schtasks /create /sc minute /mo 1 /tn "my cron" /tr "php -f d:\w
ork\magento\cron.php

So the cron.php is called every 1 minutes.
But my cronexec() function are not working. So I installed the AOE-scheduler extension and reviewed the information. There was my cron function correctly. By the way there is a message 'there is no heartbeat work now'. I guess there is no error on my php program. Only the magento cron cannot run on the windows 7. Is is right? Please help me.



Answers 1


Cron Setup looks fine. You can also just run cron.php from browsers as

http://SITE_BASE_URL/cron.php

Resource Magento Basic Cron Job Module setup

Akhil Gupta
Akhil Gupta
March 24, 2016 07:19 AM

Related Questions





magento test framework composer install issue

Updated September 27, 2016 09:03 AM