Skip to content

Magento : Execute Custom Module Cron Manually

let say we have cron setup on config.xml, like this

<crontab>
        <jobs>            
	    <alertreminder_abdcart>
                <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
                <run><model>alertreminder/cron::Abdcart</model></run>
            </alertreminder_abdcart>            

        </jobs>
    </crontab>

and then a functions ready to execute

class AN_Alertreminder_Model_Cron{	
	public function Abdcart(){
		//do something
      }
}

we can execute manually by run following script

$model = Mage::getModel('alertreminder/cron');
$model->Abdcart();

 

Share

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *