H-Sphere Sysadmin Guide

CP Cron Jobs

 

Related Docs:  

Cron Scripts

Along with the cron scripts that H-Sphere puts into its physical servers' crontabs, there are several cron jobs that are executed by H-Sphere on the Control Panel server:

  • Accounting - recurrent billing process
  • OverLimitCron - checks that the account is not going over the limmit
  • ResellerCron - billing for resellers
  • TrialCron - to automatically suspend trial accounts
  • RevenueCron - for calculationg billing summary info
  • ContentMovingCron - completes the process of moving user content
  • FailedSignupsCron - sends information about an account that failed to sign up
  • TTAutocloseCron - closes trouble tickets answered a certain time ago
  • VPSCron - completes the process of creating virtual server
  • 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

1. In the 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).

To change the launching time for all future dates, 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';

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.

2. In 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 changing cron job launching periods and adding new custom CP crons. You may also do this by means of H-Sphere packages.

 


Related Docs:  

Cron Scripts



© Copyright 1998-2004. Positive Software Corporation.
All rights reserved.