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:\work\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.