We build software, dev stacks & apps — and we still offer hosting.
hTech

Cron & Automation: How Scheduling Works Print

  • 0

Cron and Automation: How Scheduling Works

This module uses a server cron job to run automated backups. If the cron is not running, automation will not run.

What the cron does

  • Checks your schedule settings
  • Finds jobs that are due
  • Runs due backups
  • Logs success or failure
  • Runs cleanup tasks if enabled

Recommended cron frequency

Run the cron every 5 minutes for reliable scheduling.

Cron command

Use this command and replace the path with your WHMCS path:

php -q /home/USERNAME/public_html/modules/addons/htech_os_backup/cron.php

If php is not found

Some servers require a full php path. Examples:

  • /usr/local/bin/php
  • /usr/bin/php
  • /opt/cpanel/ea-php82/root/usr/bin/php

Example using a full php path

/opt/cpanel/ea-php82/root/usr/bin/php -q /home/USERNAME/public_html/modules/addons/htech_os_backup/cron.php

How scheduling works

  • The cron runs on a timer you set in the server scheduler
  • Each run checks if a backup is due based on your schedule
  • If due, it runs the backup and writes logs

How to confirm it is working

  • Check the module dashboard for the latest run time or latest logs
  • Check the WHMCS activity log for module entries
  • If you have SSH, run the cron command manually and verify logs update

Common problems and fixes

Problem: Automation never runs

  • Fix: Make sure the server cron job is created and enabled
  • Fix: Set it to run every 5 minutes

Problem: Cron runs but no backups start

  • Fix: Make sure automation is enabled in the module
  • Fix: Make sure a schedule is selected
  • Fix: Make sure a destination is configured and tested

Problem: Wrong php version or php command not found

  • Fix: Use the full php path instead of just php

Problem: Permission errors

  • Fix: Ensure the module storage and temp folders are writable

Problem: Backups overlap or run too often

  • Fix: Keep cron at every 5 minutes
  • Fix: Schedule backups during off peak hours

Need help

  • Include your cron command
  • Include the time you expected it to run
  • Include the module log error message
  • Include your php version output

Was this answer helpful?

Related Articles

« Back