When a custom Magento cron job runs longer than its configured interval, another execution may start while the previous one is still working. For imports, exports or other write operations, that can lead to duplicate processing or conflicting writes. Magento…
Which Module Defines Which Cron Job? (Magento 2)
Ever seen an unfamiliar cron job in cron_schedule but could not tell which module owns it from the job_code alone? Magento cron jobs are normally defined in a crontab.xml. A simple code search can reveal the corresponding definition.
|
1 |
grep -R --include="crontab.xml" 'job name="mein_job_code"' app/code vendor |
If…
Setting running status correctly in Magento 1.4
The setting of the running status in the cron_schedule table in Magento 1.4 is not working correctly. The code in Magento 1.4 is not 100% correct. Create a local copy of Mage_Cron_Model_Observer and take a look at the dispatch function:…
Configuring and running cron jobs (Magento 1)
To add and run a Magento cron job in your module, add the following XML to your modules config.xml:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<config> <crontab> <jobs> <some_unique_job_code> <schedule> <!-- every minute for example --> <cron_expr>*/1 * * * *</cron_expr> </schedule> <run> <model>module/observer::functionToRun</model> </run> </some_unique_job_code> </jobs> </crontab> </config> |
Thats the first step. Once that was done, you have to manually or automatically run cron.php. Its in your stores…