Browse topics

Cron jobs

Background work runs from one cron job that calls cron.php every minute. Each job decides on its own when it has something to do.

Setup in cPanel

  1. Open Cron Jobs in cPanel.
  2. Under Add New Cron Job, choose Once Per Minute (* * * * *).
  3. Enter the command shown at the end of the installer (also on Admin → Cron & maintenance):
php /home/USERNAME/public_html/cron.php --quiet

Some hosts need the full PHP path, for example /usr/local/bin/php. Make sure it is PHP 8.1 or newer: run php -v in cPanel Terminal.

Jobs

JobWhat it does
link_expiryMarks links that passed their expiration date and sends the link.expired webhook once
link_activationHandles scheduled links that have become active
webhooksDelivers queued webhook events and retries failed ones
domainsRe-verifies custom domains (DNS, SSL, routing) on the configured interval
analytics_cleanupRemoves clicks older than the retention period
log_cleanupRemoves old system logs, API logs, cron history and finished deliveries
temp_cleanupRemoves temporary files, expired tokens, sessions and rate-limit counters

Safety

  • Repeat-safe: running a job twice has the same effect as running it once.
  • No overlap: each job takes a database lock. If a previous run is still busy, the new run records the job as skipped.
  • Observable: every run is stored with its status, item count, duration and message. See Admin → Cron & maintenance and System health.
  • CLI only: cron.php cannot be opened in a browser (it returns 404).

Manual runs

From cPanel Terminal or SSH:

php cron.php --list          # list jobs
php cron.php                 # run all jobs
php cron.php --job=webhooks  # run one job
php cron.php --job=domains,link_expiry

The exit code is 0 when all jobs succeed and 1 if any job failed (details are in the output and the logs).

If cron is not running

System health shows a warning when no cron run was recorded in the last 10 minutes. Without cron, short links still redirect, but webhooks are not delivered, domains are not re-checked and old data is not cleaned up.