How i can set up cron time on config.xml on my module to magento??
Something like::
<crontab>
<jobs>
<captcha_delete_old_attempts>
<schedule>
<cron_expr><!--dynamic info here--></cron_expr>
</schedule>
<run>
<model>captcha/observer::deleteOldAttempts</model>
</run>
</captcha_delete_old_attempts>
<captcha_delete_expired_images>
<schedule>
<cron_expr><!--dynamic info here--></cron_expr>
</schedule>
<run>
<model>captcha/observer::deleteExpiredImages</model>
</run>
</captcha_delete_expired_images>
</jobs>
</crontab>
Best Answer
See my example:
1.Your cron configuration in config.xml:
2.Create cron time configuration in your system.xml:
It shows following configuration in admin:
3.Backend model
<backend_model>uzkart/adminhtml_system_config_backend_payment_cron</backend_model>
refers to this model:
4.When you save your configuration in admin, it will generate following lines in
core_config_data
table of magento and magento cron scheduler will use this config: