Provides a cron time-based job scheduler for administrators and customers.
This plugin provides a cron time-based job scheduler for administrators and customers.
The administrators give cron permissions to resellers, and the resellers give cron permissions to their customers, according their own permissions.
Administrators can also add their own cron jobs, using their own interface which is less restricted than the customer interface. Administrators can choose the user to use for cron jobs execution while the customers cannot.
Each cron job is added in the crontab(5)
file that belongs to the UNIX user
under which the cron task must be executed. For customers, this is the UNIX
Web user that is automatically created by i-MSCP (vuxxx user).
i-MSCP Serie ≥ 1.6.x (plugin API ≥ 1.5.1)
- i-MSCP InstantSSH plugin ≥ 6.0.0
- Be sure that all requirements are met
- Upload the plugin through the plugin management interface
- Install the plugin through the plugin management interface
Depending on your system, and if the support for jailed cron environment is available, the installation can take up to several minutes.
- Read the UPDATE.md file
- Be sure that all requirements are met
- Upload the plugin through the plugin management interface
Depending on your system, and if the support for jailed cron environment is available, the update can take up to several minutes.
If this plugin is already activated, and if you want enable the support for jailed cron environment, you must follow these steps:
- Install the required InstantSSH plugin version
- Deactivate and re-activate this plugin through the plugin management interface
The cron environment is the place from which a cron task is executed. Depending of your setup, the plugin can provides one or two types of cron environments:
Standard
Jailed
The standard
cron environment has nothing special. Cron jobs are executed on
the system has usually. That cron environment is best suitable for trusted
users as it is less secure than the jailed
cron environment.
The jailed
cron environment provides better security level than the
standard
cron environment. The cron tasks are executed inside a restricted
environment (chroot) from which it is theorically not possible to escape. This
should be the prefered cron environment for untrusted users.
By default, and if the support for jailed cron environment is available (see below), the plugin will create a jailed cron environment that provides:
- GNU Wget
- PHP (CLI) and PHP extensions (the same available for the system PHP)
- MySQL CLI and mysqldump
- A set of common UNIX utilities
It is of course possible to make other commands available in the jailed cron
environment. See the InstantSSH
plugin documentation for further details.
The jailed
cron environment is only available when the InstantSSH
plugin is
installed. This plugin make use of the jail builder library that is provided by
the InstantSSH plugin.
For the resellers, as for the customers, the jailed cron environment is always available, regardless of the cron environment that is permitted:
jailed
: Only the jailed cron environment is available.standard
: Bothstandard
andjailed
cron environment are available.
If a reseller or customer does have access only to the jailed cron environment
but the requirements for this environment are not met, the plugin will fallback
to the standard
environment, regardless of what the interface say.
There are two types of cron job: Url
and Shell
The Url
cron job type make customers able to execute commands through GNU Wget.
The commands must be valid HTTP(s) URLs. That cron job type is always available,
regardless of the cron job type that is permitted for a customer:
Url
: Only theUrl
cron job type is available.Shell
: BothUrl
andShell
cron job types are available.
The Shell
cron job type make customers able to execute commands through the
Shell interpreter which by default can be Dash
or Bash
, depending of your
distribution.
The plugin handles the crontab(5)
files automatically. You must bear in mind
that any manual change made in a crontab file that 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.
A crontab file is under the control of this plugin as soon as a cron task is added for the user it belongs to.
See the config.php file inside the archive.
If you change a configuration parameter in the plugin configuration file, you must not forget to trigger a plugin list update through the plugin management interface, else your changes won't be taken into account.
i-MSCP CronJobs plugin
@author Laurent Declercq <[email protected]>
@copyright (C) 2014-2017 Laurent Declercq <[email protected]>
@license i-MSCP License <https://www.i-mscp.net/license-agreement.html>
See the LICENSE file inside the archive for further details.