Article ID: 5306, created on Jun 4, 2008, last review on May 11, 2014

  • Applies to:
  • Plesk Billing


Parallels Plesk Billing was designed not only to be a billing system, but to be a billing automation system. While it is possible to use Parallels Plesk Billing without automation, it was built with the assumption that users will set up the system to be run, by and large, automatically.

Setting up automation requires two main steps:

   1. Configuring Parallels Plesk Billing with settings that do not conflict, so that when various events are run no conflicts occur.
   2. Setting up a cron job on your server to run the events themselves.

Note: If you are using a Windows server, you will need to set up an event in your event manager.

One of the central parts of Parallels Plesk Billing automation system is Events. By events here we are not referring to events in a Windows system, but events within Parallels Plesk Billing itself. When Parallels Plesk Billing is initially installed, there are eight events created by default. These events run some of the important tasks like generating invoices, suspending clients who do not pay their bills, and charging credit cards.

In addition to the eight events explained below, Parallels Plesk Billing will also create events to carry out other actions. These include domain registration and renewals, provisioning packages, and, if you choose to do so manually, generating invoices and processing credit cards. Each event, when created, is given a time stamp that tells the system when the event should be run.









All events, whether they were created by default or by another system process, are placed into the system queue. Some of the rules that govern how these events carry out their tasks can be configured in the administrative interface. There are also a small number of settings in the main configuration file that may affect the way the system queue is run.

The system queue allows you to:

  1. Run any amount of items at a time.
  2. Create accounts on any supported control panel.
  3. Auto-Suspend/Enable accounts on any supported control panel.
  4. Process payments.
  5. Process domains.

Setting Up the Cron Job

Note: During Parallels Plesk Billing 6.0 bundle installation or bundle update from version 5.6 the cron job is set up automatically. Skip this step if you are running 6.0 bundle version.

The last step in configuring your Parallels Plesk Billing to run with automation is to set up a cron job on your server (or event, if you're using Windows). When this job starts, it will run a script that will sift through the events in your system queue, looking for any events that are due to be run, and then process them.

The system automatically adds an administrator user called Cron User. This user has a Remote Access Hash needed to run the System Queue for complete automation. Follow the steps below to get your cron job setup.

Also, refer to the Cron Job in Linux section for general guidelines on this matter.

To copy the hash for your Cron user:
  1. Go to System > System Settings > Admin Settings.
  2. Find the Cron User record.
  3. Click the magnifying glass icon.
  4. Copy the Remote Access Hash.
  5. Log in to your server using SSH.
  6. Open your /path/to/pleskbilling/lib-billing/include/config/config.php file and paste the Remote Access Hash as shown below:

    $CONF["remoteAccessHash"] = "f2ad7647377beb58808b8ffceff5527d4f9d4c1d";

  7. Save the file.


In order for cron and automation to run properly, your cron admin user must be assigned the permissions needed to run cron.

To Check Your Cron User Permissions:

  1. Go to System > Admin Settings > Admin Settings.
  2. Find the Cron User record.
  3. Click the pencil icon.
  4. In the row Assigned Admin Groups, make sure the cronadmin box is checked.
  5. Click Update Profile to save changes.

To set up your crontab to run runevents.php file:

  1. Log in to your server using SSH.
  2. Edit your crontab. To do this, type the following command and press ENTER:

    crontab -e

  3. Your entry for Parallels Plesk Billing should follow this format:

    */5 * * * * /path/to/php /path/to/pleskbilling/admin/sbin/runevents.php

    The timing you see here sets the cronjob to run every five minutes. It can be adjusted if you like, but this is recommended.

    Note: In order to determine the path to your system's PHP binary, run the following command:
    # which php

  4. Save the file.

This will allow you to process all automated items in your Parallels Plesk Billing system.

08b3edb77202fffdd656b40acff117c1 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF