Created
February 27, 2015 10:54
-
-
Save andrew-smart/82c3d89fa1f2be2cef73 to your computer and use it in GitHub Desktop.
Expose a modules crontab schedule to system configuration (Magento 1.x)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0"?> | |
| <config> | |
| ... | |
| <crontab> | |
| <jobs> | |
| <[namespace]_cron> | |
| <schedule> | |
| <!-- | |
| /** | |
| * | |
| * The magic. | |
| * Exposes the schedule to system config. | |
| * | |
| * Now you can add system config for your module | |
| * and change the schedule as you see fit. | |
| * | |
| */ | |
| --> | |
| <config_path>path/to/config_var</config_path> | |
| </schedule> | |
| <run> | |
| <model>[namespace]/observer::method</model> | |
| </run> | |
| </[namespace]_cron> | |
| </jobs> | |
| </crontab> | |
| ... | |
| <default> | |
| <path> | |
| <to> | |
| <config_var>0 * * * *</config_var> | |
| </to> | |
| </path> | |
| </default> | |
| ... | |
| </config> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment