Complete guide for configuring scheduled tasks for the FusionPBX server module.
TZ=America/Torontoyourwhmcs.com with your actual WHMCS domain.
Processes CDRs and generates invoices for services with realtimebilling=0.
TZ= parameter is required on AlmaLinux 9 / systemd-based systems to ensure cron jobs run in the correct timezone, not UTC.America/Toronto with your timezone: Use your server's timezone identifier, such as America/New_York, Europe/London, or Asia/Tokyo. You can find your timezone by running timedatectl on your server or checking the PHP timezone list.
# FusionPBX Autobill v2 (separate invoices per service)
55 00 * * * TZ=America/Toronto GET https://yourwhmcs.com/modules/servers/fusionpbx/autobill_v2.php?runfrom=cron
# FusionPBX Autobill v3 (consolidated invoices - Recommended)
55 00 * * * TZ=America/Toronto GET https://yourwhmcs.com/modules/servers/fusionpbx/autobill_v3.php?runfrom=cron
# Alternative: More time before WHMCS daily cron
45 00 * * * TZ=America/Toronto GET https://yourwhmcs.com/modules/servers/fusionpbx/autobill_v3.php?runfrom=cron
# PHP CLI format (alternative)
55 00 * * * TZ=America/Toronto /usr/bin/php -q /path/to/whmcs/modules/servers/fusionpbx/autobill_v3.php runfrom=cron
Processes CDRs in near real-time for services with realtimebilling=1. Deducts usage from client credit balance.
*/15 * * * * TZ=America/Toronto GET https://yourwhmcs.com/modules/servers/fusionpbx/realtimebilling.php?runfrom=cron
Monitors client credit balance and automatically suspends or unsuspends FusionPBX tenant gateways.
*/5 * * * * TZ=America/Toronto GET https://yourwhmcs.com/modules/servers/fusionpbx/autosuspend.php?runfrom=cron
| Script | Frequency | Purpose |
|---|---|---|
autobill_v2.php |
Daily 12:45 AM | Standard CDR billing (before WHMCS cron) |
autobill_v3.php |
Daily 12:45 AM | Consolidated CDR billing (before WHMCS cron) |
realtimebilling.php |
Every 15 minutes | Real-time CDR billing and credit deduction |
autosuspend.php |
Every 5 minutes | Credit-based gateway suspend/unsuspend |
?runfrom=cron parameter to execute in cron mode.Remove old log files to prevent disk space issues.
# Delete ictvoipbilling logs older than 30 days (daily at 3:00 AM)
0 3 * * * TZ=America/Toronto find /path/to/whmcs/modules/addons/ictvoipbilling/storage/logs -name "*.log" -mtime +30 -delete >/dev/null 2>&1
>/dev/null 2>&1 to see output.?runfrom=cron for debug mode.# Autobill - Run manually with output
TZ=America/Toronto php /path/to/whmcs/modules/servers/fusionpbx/autobill_v2.php runfrom=cron
# Real-Time Billing - Run manually with output
TZ=America/Toronto php /path/to/whmcs/modules/servers/fusionpbx/realtimebilling.php runfrom=cron
# Auto Suspend - Run manually with output
TZ=America/Toronto php /path/to/whmcs/modules/servers/fusionpbx/autosuspend.php runfrom=cron
# Autobill - Test via curl with output
TZ=America/Toronto curl "https://yourwhmcs.com/modules/servers/fusionpbx/autobill_v2.php?runfrom=cron"
# Real-Time Billing - Test via curl with output
TZ=America/Toronto curl "https://yourwhmcs.com/modules/servers/fusionpbx/realtimebilling.php?runfrom=cron"
# Auto Suspend - Test via curl with output
TZ=America/Toronto curl "https://yourwhmcs.com/modules/servers/fusionpbx/autosuspend.php?runfrom=cron"
mod_ictvoipbilling_fusionpbx_cdrs table for CDR status.Document Last Updated: February 20, 2026
Module Version: 1.4.0