Magento How to Set Up a Cron Job


/ Published in: PHP
Save to your folder(s)

Magento allows you to schedule custom tasks in an XML configuration, in a similar manner to the UNIX crontab style. Here is an example from app/code/core/Mage/CatalogRule/etc/config.xml:


Copy this code and paste it in your HTML
  1. <config>
  2. ...
  3. <crontab>
  4. <jobs>
  5. <catalogrule_apply_all>
  6. <schedule><cron_expr>0 1 * * *</cron_expr></schedule>
  7. <run><model>catalogrule/observer::dailyCatalogUpdate</model></run>
  8. </catalogrule_apply_all>
  9. </jobs>
  10. ...
  11. </crontab>
  12. ...
  13. </config>

URL: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.