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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -