User Tools

Site Tools


plugins:cronjobs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugins:cronjobs [2014/12/30 04:26]
nuxwin
plugins:cronjobs [2015/06/10 23:02] (current)
ninos [Jailed]
Line 2: Line 2:
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-This documentation is for to the latest version available in our plugins store. For an oldest documentation,​ see the README.md file inside the plugin archive.+This documentation is for to the latest version available in our plugins store. For an oldest documentation,​ see the **README** file inside the plugin archive.
 </​WRAP>​ </​WRAP>​
-=====Introduction===== 
  
-This plugin ​provide ​a cron time-based job scheduler ​for i-MSCP+===== Introduction ===== 
 + 
 +This plugin ​provides ​a cron time-based job scheduler.
  
 Administrators give cron job permissions to their resellers, and the resellers give cron job permissions to their customers according their own permissions. For instance, a reseller will be able to give the full cron job permission to a customer only if he has also this permission. Administrators give cron job permissions to their resellers, and the resellers give cron job permissions to their customers according their own permissions. For instance, a reseller will be able to give the full cron job permission to a customer only if he has also this permission.
Line 12: Line 13:
 Administrators can also add their own cron jobs using their own interface which is less restricted than the customer interface in the sense that they can set the UNIX user to use for the cron job execution while the customers cannot. Administrators can also add their own cron jobs using their own interface which is less restricted than the customer interface in the sense that they can set the UNIX user to use for the cron job execution while the customers cannot.
  
-Each cron job is added in the crontab file ( see crontab(5) ) that belongs to the UNIX user under which the cron command must be run. For customers, this is the Web user as created by i-MSCP.+Each cron job is added in the crontab file (see crontab(5)) that belongs to the UNIX user under which the cron command must be run. For customers, this is the Web user as created by i-MSCP.
  
-=====Requirements=====+===== Requirements =====
  
-  * i-MSCP >= 1.1.21 ( plugin API >= 0.2.15 )+  * i-MSCP ​version ​>= 1.2.3
  
-====Requirements for jailed cron jobs support====+==== Requirements for jailed cron jobs support ====
  
-  * InstantSSH plugin >= 3.1.0+  * i-MSCP ​InstantSSH plugin >= 3.2.0
  
-**Note:** It is not necessary to activate the InstantSSH plugin. Only its presence is required.+=== Debian / Ubuntu packages ===
  
-===Debian / Ubuntu packages=== 
- 
-  * libpam-chroot 
-  * makejail 
   * msmtp   * msmtp
  
-You can install ​these packages ​by executing the following command:+You can install ​this package ​by executing the following command:
  
- # aptitude install ​libpam-chroot makejail ​msmtp+  ​aptitude update && ​aptitude install msmtp
  
-**Notes** +**Note:** The msmtp package is required to allow cron to send email notifications from the jailed environment
-  - If support for jailed cron jobs is detected and a package is not installed on your system, an error will be throw +
-  - The msmtp package is required to allow cron to send email notifications from the jailed environment+
  
-=====Installation=====+===== Installation =====
  
-1. Login into the panel as admin and go to the plugin ​management interface +  - Be sure that all requirements ​as stated in the requirements section are meets 
-2. Upload the plugin ​archive +  - Install the InstantSSH ​plugin ​if you want jailed cron jobs support 
-3. Activate ​the plugin+  ​- ​Upload the plugin ​through the plugin management interface 
 +  - Install ​the plugin ​through the plugin management interface
  
-=====Update=====+**Note:** Depending on your system and if support for jailed cron jobs is available, installation can take up to several minutes. Time is needed to build jail.
  
-1. Backup your **plugins/​CronJobs/​config.php** configuration file +===== Update =====
-2. Login into the panel as admin and go to the plugin management interface +
-3. Deactivate the plugin +
-4. Upload the plugin archive +
-5. Restore your **plugins/​CronJobs/​config.php** configuration file ( compare it with the new version first ) +
-6. Activate the plugin+
  
-=====Activation of jailed cron jobs support=====+  - Be sure that all requirements as stated in the requirements section are meets 
 +  - Backup your plugin configuration file if needed 
 +  - Upload the plugin through the plugin management interface 
 +  - Restore your plugin configuration file if needed ( compare it with the new version first ) 
 +  - Update the plugin list through the plugin management interface 
 + 
 +**Note:** Prior any update attempt, do not forget to read the **UPDATE** file inside the plugin archive. 
 + 
 +===== Activation of jailed cron jobs support =====
  
 If this plugin is already activated and if you want enable support for jailed cron jobs later on, you must follow these instructions:​ If this plugin is already activated and if you want enable support for jailed cron jobs later on, you must follow these instructions:​
    
-1. Be sure that all required packages as mentioned in the requirements section are installed on your system +  - Install ​the InstantSSH plugin 
-2. Upload ​the InstantSSH plugin +  ​- ​Deactivate this plugin ​through the plugin management interface 
-3. Deactivate this plugin +  ​- ​Re-activate this plugin ​through the plugin management interface
-4. Re-activate this plugin+
  
-=====Cron job types=====+===== Cron job types =====
  
-Three types of cron jobs are available, which are in order: ​**URL****Jailed** and **Full**.+Three types of cron jobs are available, which are in order: URL, Jailed and Full.
  
-====URL====+==== URL ====
  
 The URL cron jobs are always available. They allow to schedule URL commands executed via GNU Wget. The commands must be valid HTTP(s) URLs. The URL cron jobs are always available. They allow to schedule URL commands executed via GNU Wget. The commands must be valid HTTP(s) URLs.
Line 72: Line 70:
 **Note:** When a customer has permission for jailed cron jobs, the URL cron jobs are run inside the jailed environment,​ else they are run outside the jailed environment. This is by design, and this do not change anything from the customer point of view. **Note:** When a customer has permission for jailed cron jobs, the URL cron jobs are run inside the jailed environment,​ else they are run outside the jailed environment. This is by design, and this do not change anything from the customer point of view.
    
-====Jailed====+==== Jailed ====
  
-The jailed cron jobs allow to schedule Shell commands which are run through the Shell interpreter in a jailed environment. By default the plugin will create a jailed environment which provides:+The jailed cron jobs allow to schedule Shell commands which are run through the Shell interpreter in a jailed 
 +environment. By default the plugin will create a jailed environment which provides:
  
   * GNU Wget   * GNU Wget
Line 81: Line 80:
   * A set of common UNIX utilities   * A set of common UNIX utilities
  
-**Note:** Only one jailed environment is created for all jailed cron jobs. The most important here, is that the cron jobs cannot ​broke the whole system.+**Note:** Only one jailed environment is created for all jailed cron jobs. The most important here, is that the cron jobs cannot ​break the whole system.
  
-===Availability===+=== Availability ===
  
-The jailed cron jobs are available only when the InstantSSH plugin is also present on the system, whatever it is activated or notThe CronJobs ​plugin reuses the jail builder library which is provided by the InstantSSH plugin to manage the jailed environment.+The jailed cron jobs are available only when the i-MSCP ​InstantSSH plugin is also installedThis plugin reuses the jail builder library which is provided by the InstantSSH plugin to manage the jailed environment.
  
 The jailed cron jobs doesn'​t apply to administrators. The jailed cron jobs doesn'​t apply to administrators.
  
-====Full====+==== Full ====
  
-The full cron jobs are identical to the jailed cron jobs, excepted the fact that the Shell commands are not run inside a +The full cron jobs are identical to the jailed cron jobs, excepted the fact that the Shell commands are not run inside a jailed environment. Such cron jobs should be reserved to trusted users.
-jailed environment. Such cron jobs should be reserved to trusted users.+
  
-=====Crontab files=====+===== Crontab files =====
  
 The plugin handles the crontab files automatically. You must note that any manual change made in a crontab file which is under the control of this plugin will be automatically overridden on next processing. Therefore, once that a crontab file is under the control of this plugin, you must use the cron jobs interface provided by this plugin to add, edit or delete a cron job in this file. The plugin handles the crontab files automatically. You must note that any manual change made in a crontab file which is under the control of this plugin will be automatically overridden on next processing. Therefore, once that a crontab file is under the control of this plugin, you must use the cron jobs interface provided by this plugin to add, edit or delete a cron job in this file.
Line 100: Line 98:
 A crontab file is under the control of this plugin as soon as you add a cron task for the user to which it belong to, through the cron jobs interface provided by this plugin. A crontab file is under the control of this plugin as soon as you add a cron task for the user to which it belong to, through the cron jobs interface provided by this plugin.
  
-=====Interfaces access=====+===== Interfaces access =====
  
-====Cron jobs permissions interface====+==== Cron jobs permissions interface ====
  
 The cron job permissions interface allow to give cron job permissions,​ either to the resellers in the context of the administrators,​ or to customers in the context of resellers. The cron job permissions interface allow to give cron job permissions,​ either to the resellers in the context of the administrators,​ or to customers in the context of resellers.
  
-* Administrators can access the cron job permissions interface through the **Customers** ​menu +  ​* Administrators can access the cron job permissions interface through the settings ​menu 
-* Resellers can access the cron job permissions interface through the **Customers** menu+  * Resellers can access the cron job permissions interface through the Customers menu
  
-**Note:** When cron job permissions are updated, any cron job which doesn'​t fit with the new permissions are simply deleted. For instance, if the execution frequency of a specific cron job is lower than the new cron jobs frequency limit,the cron job is automatically removed.+**Note:** When cron job permissions are updated, any cron job which doesn'​t fit with the new permissions are simply deleted. For instance, if the execution frequency of a specific cron job is lower than the new cron jobs frequency limit, the cron job is automatically removed.
  
-====Cron jobs interface====+==== Cron jobs interface ====
  
 The cron jobs interface allows administrators and customers to add, edit and delete cron jobs. The cron jobs interface allows administrators and customers to add, edit and delete cron jobs.
  
-* Administrators can access the cron jobs interface through the **System tools** menu +  ​* Administrators can access the cron jobs interface through the System tools menu 
-* Customers can access the cron jobs interface through the **Webtools** menu +  * Customers can access the cron jobs interface through the Webtools menu
- +
-=====Translation===== +
- +
-You can translate this plugin by copying the [l10n/​en_GB.php](l10n/​en_GB.php) language file, and by translating all the array values inside the new file. +
- +
-Feel free to post your language files in our forum for integration in a later release. +
- +
-**Note:** File encoding must be UTF-8. +
- +
-=====Plugin Usage===== +
- +
-A small contribution for use of this plugin is requested by doing a donation on my paypal account ( [email protected] ). If you do not want to contribute, you should not use that plugin. +
- +
-=====License=====+
  
- i-MSCP CronJobs plugin +===== Configuration =====
- copyright (c) 2014 laurent declercq <​[email protected]>​ +
-  +
- This library is free software; you can redistribute it and/or +
- modify it under the terms of the GNU Lesser General Public +
- License as published by the Free Software Foundation; either +
- version 2.1 of the License, or (at your option) any later version. +
-  +
- This library is distributed in the hope that it will be useful, +
- but WITHOUT ANY WARRANTY; without even the implied warranty of +
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ​ See the GNU +
- Lesser General Public License for more details. +
-  +
- You should have received a copy of the GNU Lesser General Public +
- License along with this library; if not, write to the Free Software +
- Foundation,​ Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 ​ USA+
  
- See [[http://​www.gnu.org/​licenses/​lgpl-2.1.txt|lgpl v2.1]]+See the config.php file inside the archive.
  
-=====Sponsors=====+**Note:** When changing a configuration parameter in the plugin configuration file, do not forget to trigger plugin change by updating the plugin list through the plugin management interface.
  
-  * [[https://​www.ip-projects.de/​|IP-Projects GmbH & Co. KG]] +===== License =====
-  * [[http://​space2place.de/​|Space2Place WebHosting]]+
  
-=====Author(s)=====+  i-MSCP CronJobs plugin 
 +   
 +  @author Laurent Declercq <​[email protected]>​ 
 +  @copyright ​(C2014-2015 Laurent Declercq 
 +  @license i-MSCP License <​http://​www.i-mscp.net/​license-agreement.html>​
  
- Laurent Declercq <​l.declercq@nuxwin.com>+See the **LICENSE** file inside the plugin archive for further details.
/var/www/virtual/i-mscp.net/wiki/htdocs/data/attic/plugins/cronjobs.1419913594.txt.gz · Last modified: 2014/12/30 04:26 (external edit)