I'm trying to set-up a cron job for multiple models. I have two methods (method1 and method2) in Model (observer.php) for which I want to set cron job. My code :
Config.xml file :
<crontab>
<jobs>
<erpbridge_update>
<schedule>
<cron_expr>* * * * *</cron_expr>
</schedule>
<run>
<model>erpbridge/observer::method1</model>
</run>
</erpbridge_update>
<mss_erpbridge>
<schedule>
<cron_expr>* * * * *</cron_expr>
</schedule>
<run>
<model>erpbridge/observer::method2</model>
</run>
</mss_erpbridge>
</jobs>
</crontab>
Name space is Mss and module name is Erpbridge, CornCron job with the right module name working perfectly <mss_erpbridge>
but this is not working </erpbridge_update>
. When I set the same key for both <mss_erpbridge>
then only the second works.
My query :
Is it possible to set a cron job for multiple Models if yes, How?