Home / System Configuration / Cron Jobs

Cron Jobs

Automated tasks (invoices, reminders, suspensions)

What it is

Cron jobs run automated tasks that keep your billing system running: invoice generation, payment reminders, service suspensions, late fees, and more. Without cron, these tasks would not run automatically.

How it works

The main cron script is cron/run.php. When executed (e.g. every 15 minutes), it:

  • Generates invoices for services due for renewal
  • Sends payment reminders for overdue invoices
  • Suspends services when invoices remain unpaid past the grace period
  • Applies late fees to overdue invoices (if configured)
  • Processes other scheduled tasks (e.g. domain expiry reminders)

CronManager and related helpers in includes/helpers/ perform the actual work.

How to set up

Step 1: Add cron entry

Add a cron job to run every 15 minutes. Example for cPanel:

*/15 * * * * /usr/bin/php -q /home/username/public_html/cron/run.php

Replace /home/username/public_html with your actual path to the WHMDC root.

Step 2: Verify PHP path

Use which php on your server to get the correct PHP path. Some servers use /usr/local/bin/php or /opt/php82/bin/php.

Step 3: Test manually

php /path/to/cron/run.php

Run from SSH to verify. Check Admin → Settings → Cron for last run time if displayed.

Cron schedule reference

ScheduleMeaning
*/15 * * * *Every 15 minutes
0 * * * *Every hour
0 0 * * *Daily at midnight

Recommended: every 15 minutes for timely reminders and suspensions.

Was this helpful?

Tags: Cron