Skip to main content
added 354 characters in body
Source Link
PЯINCƎ
  • 11.7k
  • 3
  • 26
  • 82
<crontab>
    <jobs>
        <Mycompany_AsyncCronjobs>
            <schedule>
                <cron_expr>* * * * *</cron_expr>
            </schedule>
            <run>
                <model>asynccronjobs_resource/runobserver::everyHour</model>
            </run>
        </Mycompany_AsyncCronjobs>
    </jobs>
</crontab>

Edit:

I renamed Run to Observer.

You model should be in this path: Mycompany/AsyncCronjobs/Model/Observer.php and not : My Mycompany/AsyncCronjobs/Cron.php

<?php
class Mycompany_AsyncCronjobs_Model_Observer
{
    public function everyHour()
    {
        mage::log('got it');
    }
}
<crontab>
    <jobs>
        <Mycompany_AsyncCronjobs>
            <schedule>
                <cron_expr>* * * * *</cron_expr>
            </schedule>
            <run>
                <model>asynccronjobs_resource/run::everyHour</model>
            </run>
        </Mycompany_AsyncCronjobs>
    </jobs>
</crontab>
<crontab>
    <jobs>
        <Mycompany_AsyncCronjobs>
            <schedule>
                <cron_expr>* * * * *</cron_expr>
            </schedule>
            <run>
                <model>asynccronjobs_resource/observer::everyHour</model>
            </run>
        </Mycompany_AsyncCronjobs>
    </jobs>
</crontab>

Edit:

I renamed Run to Observer.

You model should be in this path: Mycompany/AsyncCronjobs/Model/Observer.php and not : My Mycompany/AsyncCronjobs/Cron.php

<?php
class Mycompany_AsyncCronjobs_Model_Observer
{
    public function everyHour()
    {
        mage::log('got it');
    }
}
Source Link
PЯINCƎ
  • 11.7k
  • 3
  • 26
  • 82

<crontab>
    <jobs>
        <Mycompany_AsyncCronjobs>
            <schedule>
                <cron_expr>* * * * *</cron_expr>
            </schedule>
            <run>
                <model>asynccronjobs_resource/run::everyHour</model>
            </run>
        </Mycompany_AsyncCronjobs>
    </jobs>
</crontab>