Skip to content

Knowledgebase

Configure both HostBill automation cron jobs

hostbill, development

HostBill uses two scheduled processes. The main cron executes tasks configured in Settings > Task List, while the queue process handles background work. Configuring only one can leave an apparently functioning billing website with incomplete automation.

01 Configure both jobs

  1. Identify the Unix account that owns the HostBill installation and the full path to its supported command-line PHP binary. Confirm that this PHP environment loads the required extensions and ionCube.
  2. Open that account's scheduler or hosting control-panel cron interface. Locate the actual installation path and administrator directory, including any renamed directory.
  3. Create the main job to run every five minutes. Point PHP at the installation's admin/cron.php, replacing admin with the configured administrator directory.
  4. Create the second job to run every minute and point PHP at queue.php in the installation root.
  5. Capture initial output to a private administrative destination. Review it for missing extensions, permission errors and incorrect paths before enabling normal monitoring.

For an installation in /srv/billing using /usr/bin/php, the scheduler entries would resemble:

Code or configuration example
*/5 * * * * /usr/bin/php -q /srv/billing/admin/cron.php
* * * * * /usr/bin/php -q /srv/billing/queue.php

These are example paths. Use your actual binary and installation directory. Run jobs as the installation owner rather than root, which can create cache files the website cannot subsequently modify.

02 Verify task processing

Review the configured task list and queue log. Confirm that expected tasks progress across more than one scheduling interval and investigate recurring failures separately from the scheduler itself. Do not repeatedly trigger all automation on production simply to test whether PHP starts.

Common questions

Why does the queue consume too many resources on shared hosting?

HostBill documents the queue's -r option for foreground operation without forking workers, including relevant shared-hosting cases. Check resource limits and provider guidance before changing worker behaviour. Monitor whether the queue still clears.

What changes after renaming the admin directory?

Update the main cron and any email-piping command to their new paths. The root-level queue path does not change merely because the administrator folder was renamed.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution