|
Hi guys,
I’ve just started programming my own magento module. The module itself works; I’ve tested it out using the ‘catalog_product_save_after’ hook, and all the neccessary fields are visible in the backend.
The problem arises when I try to hook my plugin to crontab. The first time I added the crontab XML-code and reinstalled plugin (by clearing cache + deleting module table + deleting core_resource table entry), a cronjob entry was added in the cron_schedule table. This cronjob was executed and “success"-ed after execution ( I received an email). However, the cronjob wasn’t re-scheduled and reinstalling didn’t work. I tried everything, but without success. My settings are as follows:
/app/code/local/Mysite/Awesomeplugin/etc/config.xml: <crontab> <jobs> <mysite_awesomeplugin_tester> <schedule><cron_expr>0,30 * * * *</cron_expr></schedule> <run><model>awesomeplugin/observer::tester</model></run> </mysite_awesomeplugin_tester> </jobs> </crontab>
/app/code/local/Mysite/Awesomeplugin/Model/Observer.php: class Mysite_Awesomeplugin_Model_Observer { public function tester() { mail( 'info@mysite.com','test','test'); return $this; } }
cronjob settings
cpanel:
*/15 * * * * /usr/local/bin/php /home/myaccount/domains/mysite.com/public_html/cron.php >/dev/null 2>&1;
Magento
Generate Schedules Every 60
Schedule Ahead for 1
Missed if Not Run Within 60
History Cleanup Every 120
Success History Lifetime 120
Failure History Lifetime 120
While checking cron_schedule, all the other modules are added/refreshed except mine. Has anyone got a lead in what direction to search for regarding this matter?
Thanks in advance!
|