So I know how to setup a cron using the config.xml crontab stuff:
<crontab>
<jobs>
<millena_export_send_all>
<schedule><cron_expr>* * * * *</cron_expr></schedule>
<run><model>millena_export/observer::exportOrderData</model></run>
</millena_export_send_all>
</jobs>
</crontab>
But what I am confused about is how to make that cron_expr a setting in the backend that can be changed (every 5 minutes, every 10 minutes, etc). I am thinking I can use a backend_model and then in an after_save method I can do setStoreConfig('path/to/schedule/cron_expr', '*/5 * * * *') or something to that sort and it will save in the cache. Is my thinking correct? Is there a better way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…