|
CP Cron (Background Jobs)
Along with the
cron scripts
that H-Sphere puts into its physical servers' crontabs,
there are several background jobs that are executed by H-Sphere on the Control Panel server:
- Accounting - does recurrent billing for end users
- OverLimitCron - checks that the account is not going over the limit
- ResellerCron - does billing for resellers
- TrialCron - suspends expired trial accounts
- RevenueCron - calculates summary billing info
- ContentMovingCron - completes the process of moving user content
- FailedSignupsCron - sends emails about failed signups (every 5 minutes)
- TTAutocloseCron - closes trouble tickets answered certain time ago
- VPSCron - queries the status of creating virtual servers (every 4 minutes)
- ecCron - processes the external_credits table and adds
payments performed within an external payment system outside H-Sphere to this table
as the account credits,
thus integrating external payments into H-Sphere. Read more about
external credits configuration.
CP Cron Configuration
H-Sphere Database
All those cron processes use the last_start table in the H-Sphere database.
This table contains the following fields:
name varchar(20) NOT NULL PRIMARY KEY,
value timestamp,
last_user int8
When H-Sphere is restarted, those values are read from this table for each cron.
Field name - CP cron job name as in the list above
(corresponds to the cron tag's name
attribute in
cron XML configuration file)
Field value - last time that cron was executed
Field last_user - user_id of the last user that was calculated with the cron
(used only for accounting and overlimit).
Changing the launching time
To change the launching time for all future dates, Log into the system database and
change the last time the cron was executed:
update last_start set value = '2003-03-24:TIME-05' where name in ('NAME');
Here:
TIME is the actual time in the format YYYY-MM-DD:HH:MM:SS
-05 in this example means hours of difference with GMT;
GMT-05 corresponds to EST (New York).
For Central Europe, this value will be +01.
NAME is the name of the cron job.
For example, to change the time of the accounting cron, execute:
hsphere=# update last_start set value='2003-03-24:06:00:00-08' where name='LAST_LAUNCH';
Most CP cron jobs start every 24 hours from their latest launching time.
In HS 2.4 and higher, it is possible to
change the CP cron job launching period.
CP Cron XML Configuration Files
(version 2.4 and higher)
From HS 2.4, it is possible to modify CP cron settings in corresponding
XML configuration files by changing cron job launching periods and
adding new custom CP crons.
You may also do this by means of
H-Sphere packages.
Background Job Manager
(version 2.4 and higher)
Background Job Manager
is a utility that allows to enable, start and
disable selected cron jobs from CP interface.
Cron jobs are available from the Admin control panel,
the Background Job System section.
|