external credits, or external charges


external credits, or external charges are the charges exported from external billing systems.

External charges are stored in the external_credits table. The ecCron internal CP cron adds charges from external billing software to the external_credits table as the accounts’ credits.

To set the time interval when ecCron is launched, you need to add the following line to hsphere.properties:

EX_CHARGE_CRON=5

In the above example, ecCron would start every 5 minutes.

The external_credits table is created during H-Sphere upgrade and has the following structure:

CREATE TABLE external_credits (
id int NOT NULL,
account_id int4,
amount float,
created timestamp with time zone,
description varchar(128),
PRIMARY KEY(id)
);