-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployed ab2064e with MkDocs version: 1.5.3
- Loading branch information
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"CronManager","text":"<p>Create and run cronjobs within the manager</p>"},{"location":"#requirements","title":"Requirements","text":"<ul> <li>MODX Revolution 2.6+</li> <li>PHP 5.6+</li> </ul>"},{"location":"#features","title":"Features","text":"<p>The CronManager for MODx makes it possible to execute snippets by the crontab of the server. By using the manager of MODx Revolution you can simply add new snippets to the cron list.</p> <p>Using snippets for your cron management also requires properties and you can add properties manually by setting up key value pairs but also with a propertyset (name).</p>"},{"location":"#license","title":"License","text":"<p>The project is licensed under the GPLv2 license.</p>"},{"location":"#translations","title":"Translations","text":"<p>Translations of the package can be made for the Default Lexicon and the System Setting Lexicon</p>"},{"location":"contributors/","title":"Contributors","text":"<p>The CronManager project was started in 2011 by Bert Ooost and is maintained and developed further since 2019 by Thomas Jakobi.</p> <p>Many thanks to all who contributed, whether by creating pull requests, submitting bug reports, or donating.</p>"},{"location":"installation/","title":"Installation","text":""},{"location":"installation/#install-from-modx-extras","title":"Install from MODX Extras","text":"<p>Search for CronManager in the Package Manager of your MODX installation and install it in there.</p>"},{"location":"installation/#manual-installation","title":"Manual installation","text":"<p>If you can't access the MODX Extras Repository in your MODX installation, you can manually install CronManager.</p> <ul> <li>Download the transport package from MODX Extras (or one of the pre built transport packages in _packages)</li> <li>Upload the zip file to your MODX installation's <code>core/packages</code> folder or upload it manually in the MODX Package Manager.</li> <li>In the MODX Manager, navigate to the Package Manager page, and select 'Search locally for packages' from the dropdown button.</li> <li>CronManager should now show up in the list of available packages. Click the corresponding 'Install' button and follow the instructions to complete the installation.</li> </ul>"},{"location":"installation/#build-it-from-source","title":"Build it from source","text":"<p>To build and install the package from source you could use Git Package Management. The GitHub repository of CronManager contains a config.json to build that package locally. Use this option, if you want to debug CronManager and/or contribute bugfixes and enhancements.</p>"},{"location":"usage/","title":"Usage","text":""},{"location":"usage/#setup-the-cron-script","title":"Setup the cron script","text":"<p>After the installation, you need to configure the cron script in your servers crontab list. On most hostings you have a control panel like Direct Admin available and mostly you're able to configure cronjobs via that control panel. If you have access to there server with SSH could add the cronjob with the \"crontab -e\" command. Add the following line as cronjob:</p> <pre><code>php /path/to/your/modx/installation/assets/components/cronmanager/cron.php\n</code></pre> <p>Note</p> <p>In some cases this command needs some modifications (i.e. the path to a version specific php file). Please discuss this with your hosting provider.</p> <p>The cron connector could also be called as an external webcronjob using the following url:</p> <pre><code>https://your.domain/assets/components/cronmanager/cron.php?cronjob_id=xxx\n</code></pre> <p>The value xxx has to be filled with the random string in the MODX system setting <code>cronmanager.cronjob_id</code></p> <p>We advise you to execute it on every minute, every day in every month (* to all: m h dom mon dow). But if you're sure, that there are no needs for an every minute cronjob, you could change the crontab interval to your own needs.</p>"},{"location":"usage/#custom-manager-page","title":"Custom Manager Page","text":"<p>To use the component, navigate to your manager and click on \"Extras > CronManager\".</p> <p></p> <p>You could create a new cronjob with a click on the create new cronjob button on the top left above the cronjob grid.</p> <p>The grid could be filtered by the snippet name with a search input on the top right above the cronjob grid.</p> <p>Each cronjob could be edited by a click on the edit icon in the row of the cronjob. The log of the cronjob could be seen with a click on the list icon in the row of the cronjob. It could be deleted after a confirmation with a click on the trash icon in the row of the cronjob.</p> <p>The row of each cronjob shows the executed snippet, the minute interval, the last and the next run and the active state of an entry. The minutes and the active state could be edited inline with a double click. The last and the next run column will contain a date when the cron script is executed.</p>"},{"location":"usage/#createedit","title":"Create/Edit","text":"<p>The create/edit window for one cronjob has a lot of options, that could be set.</p> <p></p> <p>You could set the executed snippet, the active state, the minute interval, the next run and the snippet properties. The snippet is executed on the <code>site_start</code> resource, and it should return a json array: <code>{\"error\": boolean, \"message\": \"string\"}</code>. If not, the output will be saved in the log message and the log entry will be set to successful. The minute interval sets the interval the snippet is executed. Example: If you enter 15, the snippet would run every 15 minutes (when the cron.php file is called every minute). The snippet properties could contain key-value pairs (each on a new line in the format <code>key: value</code>), a JSON object or the name of a propertyset.</p> <p>The snippet cannot be terminated with <code>exit()</code>, because the CronManager is also terminated with this exit. So it cannot write any success or error message to the database. Since version 1.2.2 <code>CronManager: 1</code> is added as default snippet property to detect if the snippet is executed by CronManager. Since version 1.2.4, the current modCronjob instance can be passed as snippet property <code>CronManagerJob</code> to the executed snippet. This has to be enabled with the <code>cronmanager.pass_modcronjob</code> MODX system seetting. This way the snippet can determine, which job triggered it, it can change and save the modCronjob instance to i.e. disable the cron job.</p> <p>Caution</p> <p>After adding a cronjob, it isn't active. You have to change the active state to yes in the <code>Active</code> column of the overview or check the checkbox in the edit window.</p>"}]} | ||
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"CronManager","text":"<p>Create and run cronjobs within the manager</p>"},{"location":"#requirements","title":"Requirements","text":"<ul> <li>MODX Revolution 2.6+</li> <li>PHP 5.6+</li> </ul>"},{"location":"#features","title":"Features","text":"<p>The CronManager for MODx makes it possible to execute snippets by the crontab of the server. By using the manager of MODx Revolution you can simply add new snippets to the cron list.</p> <p>Using snippets for your cron management also requires properties and you can add properties manually by setting up key value pairs but also with a propertyset (name).</p>"},{"location":"#license","title":"License","text":"<p>The project is licensed under the GPLv2 license.</p>"},{"location":"#translations","title":"Translations","text":"<p>Translations of the package can be made for the Default Lexicon and the System Setting Lexicon</p>"},{"location":"contributors/","title":"Contributors","text":"<p>The CronManager project was started in 2011 by Bert Ooost and is maintained and developed further since 2019 by Thomas Jakobi.</p> <p>Many thanks to all who contributed, whether by creating pull requests, submitting bug reports, or donating.</p>"},{"location":"installation/","title":"Installation","text":""},{"location":"installation/#install-from-modx-extras","title":"Install from MODX Extras","text":"<p>Search for CronManager in the Package Manager of your MODX installation and install it in there.</p>"},{"location":"installation/#manual-installation","title":"Manual installation","text":"<p>If you can't access the MODX Extras Repository in your MODX installation, you can manually install CronManager.</p> <ul> <li>Download the transport package from MODX Extras (or one of the pre built transport packages in _packages)</li> <li>Upload the zip file to your MODX installation's <code>core/packages</code> folder or upload it manually in the MODX Package Manager.</li> <li>In the MODX Manager, navigate to the Package Manager page, and select 'Search locally for packages' from the dropdown button.</li> <li>CronManager should now show up in the list of available packages. Click the corresponding 'Install' button and follow the instructions to complete the installation.</li> </ul>"},{"location":"installation/#build-it-from-source","title":"Build it from source","text":"<p>To build and install the package from source you could use Git Package Management. The GitHub repository of CronManager contains a config.json to build that package locally. Use this option, if you want to debug CronManager and/or contribute bugfixes and enhancements.</p>"},{"location":"usage/","title":"Usage","text":""},{"location":"usage/#setup-the-cron-script","title":"Setup the cron script","text":"<p>After the installation, you need to configure the cron script in your servers crontab list. On most hostings you have a control panel like Direct Admin available and mostly you're able to configure cronjobs via that control panel. If you have access to there server with SSH could add the cronjob with the \"crontab -e\" command. Add the following line as cronjob:</p> <pre><code>php /path/to/your/modx/installation/assets/components/cronmanager/cron.php\n</code></pre> <p>Note</p> <p>In some cases this command needs some modifications (i.e. the path to a version specific php file). Please discuss this with your hosting provider.</p> <p>The cron connector could also be called as an external webcronjob using the following url:</p> <pre><code>https://your.domain/assets/components/cronmanager/cron.php?cronjob_id=xxx\n</code></pre> <p>The value xxx has to be filled with the random string in the MODX system setting <code>cronmanager.cronjob_id</code></p> <p>We advise you to execute it on every minute, every day in every month (* to all: m h dom mon dow). But if you're sure, that there are no needs for an every minute cronjob, you could change the crontab interval to your own needs.</p>"},{"location":"usage/#custom-manager-page","title":"Custom Manager Page","text":"<p>To use the component, navigate to your manager and click on \"Extras > CronManager\".</p> <p></p> <p>You could create a new cronjob with a click on the create new cronjob button on the top left above the cronjob grid.</p> <p>The grid could be filtered by the snippet name with a search input on the top right above the cronjob grid.</p> <p>Each cronjob could be edited by a click on the edit icon in the row of the cronjob. The log of the cronjob could be seen with a click on the list icon in the row of the cronjob. It could be deleted after a confirmation with a click on the trash icon in the row of the cronjob.</p> <p>The row of each cronjob shows the executed snippet, the minute interval, the last and the next run and the active state of an entry. The minutes and the active state could be edited inline with a double click. The last and the next run column will contain a date when the cron script is executed.</p>"},{"location":"usage/#createedit","title":"Create/Edit","text":"<p>The create/edit window for one cronjob has a lot of options, that could be set.</p> <p></p> <p>You could set the executed snippet, the active state, the minute interval, the next run and the snippet properties. The snippet is executed on the <code>site_start</code> resource, and it should return a json array: <code>{\"error\": boolean, \"message\": \"string\"}</code>. If not, the output will be saved in the log message and the log entry will be set to successful. The minute interval sets the interval the snippet is executed. Example: If you enter 15, the snippet would run every 15 minutes (when the cron.php file is called every minute). The snippet properties could contain key-value pairs (each on a new line in the format <code>key: value</code>), a JSON object or the name of a propertyset.</p> <p>The snippet cannot be terminated with <code>exit()</code>, because the CronManager is also terminated with this exit. So it cannot write any success or error message to the database. Since version 1.2.2 <code>CronManager: 1</code> is added as default snippet property to detect if the snippet is executed by CronManager. Since version 1.2.4, the current modCronjob instance can be passed as snippet property <code>CronManagerJob</code> to the executed snippet. This has to be enabled with the <code>cronmanager.pass_modcronjob</code> MODX system seetting. This way the snippet can determine, which job triggered it, it can change and save the modCronjob instance to i.e. disable the cron job.</p> <p>Caution</p> <p>After adding a cronjob, it isn't active. You have to change the active state to yes in the <code>Active</code> column of the overview or check the checkbox in the edit window.</p>"},{"location":"usage/#system-settings","title":"System Settings","text":"<p>CronManager uses the following system settings in the namespace <code>cronmanager</code>:</p> Key Name Description Default cronmanager.cronjob_id Cronjob ID String, that has to be added to the cronjob URL as cronjob_id parameter. - cronmanager.debug Debug Log debug information in the MODX error log. No cronmanager.pass_modcronjob Pass modCronjob Pass the modCronjob instance to the executed snippet in the CronManagerJob snippet property. Disable the option if the cronjob snippet throws an \"Object of class modCronjob_mysql could not be converted to string\" error. No cronmanager.purge_running Purge Running Cronjobs Number of minutes after which running cronjobs are cleaned up in order to reset cronjobs that are no longer responding. 60"}]} |
Binary file not shown.
This file contains 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