php - magento passing variable to config.xml from frontend -
i have created custom module , custom cron job. here code:
<crontab> <jobs> <customer_cron_job> <schedule> <cron_expr>*/1 * * * *</cron_expr><!-- configurable custom admin frontend--> </schedule> <run> <model>globalconnector/observer::cronupdates</model> </run> </customer_cron_job> </jobs> </crontab>
now module has custom admin frontend. here want provide functionality user specify time (cron_expr) cron job run. i.e. 'cron_expr' dynamically set. appreciated.
<crontab> <jobs> <company_export_send_order> <schedule> <!-- use config path in system.xml here --> <config_path>globalconnector/general/cron_settings</config_path> </schedule> <run> <model>globalconnector/observer::cronupdates</model> </run> </company_export_send_order> </jobs> </crontab>
in module's system.xml, define text field in enter cron expression.
more detail here: magento cron in backend configuration
Comments
Post a Comment