The panel cron and the task queue

The systemd timer or crontab line, the heartbeat, every job with its interval, the task queue and the Task Queue Monitor, notifications, and what to do when the cron stops.

AIOhPanel does its background work in one program, cron/cron.php. It checks the services, collects bandwidth and disk use, renews certificates, runs backups, checks the licence and runs the queue of long tasks. Without it the panel still opens, but nothing keeps itself up to date.

How it is started

WhereHow
Linux serverinstall.sh installs a systemd timer, aiohpanel-cron.timer, that runs aiohpanel-cron.service (which runs php /usr/local/aiohpanel/cron/cron.php) two minutes after boot and then every 5 minutes.
Your own crontabService Configuration → Service Manager → Cron Heartbeat shows the exact line, for example * * * * * /usr/local/aiohpanel/bin/aiohpanel cron >/dev/null 2>&1.
Demo host or shared hostingAdd a cron job in that host's panel for php /path/to/aiohpanel/bin/aiohpanel cron every minute or every 5 minutes.
By handaiohpanel cron, or aiohpanel cron --force to run every job now.

Running it more often than needed is harmless: each job remembers when it last ran and skips itself until its time is due.

The heartbeat

The first job, heartbeat, only writes the time. The Home page shows it as Cron: 2 minutes ago, or a red never ran. The Cron Heartbeat card on the Service Manager says Running (under three minutes), Late or Never ran. The Security Advisor warns when the cron has not run for ten minutes. If the heartbeat is old, check systemctl status aiohpanel-cron.timer and /usr/local/aiohpanel/data/logs/cron.log.

The jobs

JobEveryWhat it does
heartbeateach runWrites the time for the Home page.
services5 minutesRefreshes each service state and starts a monitored one that is down, with a notification.
bandwidth15 minutesReads the web server logs and adds traffic to each account.
disk-usage1 hourMeasures each account's disk, inodes, mailboxes and databases.
bandwidth-limits1 hourSuspends accounts over their bandwidth limit; on the 1st of a month resets the counters and unsuspends them.
autossl1 dayIssues and renews certificates. See DNS and SSL.
backups1 hourStarts the scheduled backups when one is due. See Services, backups and server settings.
cleanup1 hourRemoves expired temporary IP blocks, old sign-in attempts, old sessions, log rows older than the keep-days setting (90) and old visitor rows.
license12 hoursChecks the licence. See The licence key.
plugins5 minutesLets plugins run their own jobs: the Malware Scanner's daily scan, the Cloud Backups transfers, the Firewall's expiring rules.
taskseach runRuns up to three queued tasks.

The output of a run lists each job as ok or FAIL with its time and a short message. A failing job writes its reason to cron.log and the others carry on.

The task queue

Some actions take too long for one page view: restoring a backup, changing a package on many accounts, terminating many accounts, a transfer from another server, installing software. The page puts a task in the queue and returns at once; the cron runs it in the background. The kinds are backup, restore, autossl, bulk-package, bulk-terminate, transfer and shell, and plugins can add more.

Server Status → Task Queue Monitor lists the tasks: number, task, status (queued, running, done, failed), progress, created and finished times. Tabs filter by All, Queued, Running, Done and Failed. Run the queue now processes the queue at once instead of waiting for the cron. Open a task to read its log, which has a time stamp for each step and the reason if it failed; a failed task can be queued again, and finished tasks can be cleared. A task that fails does not stop the others.

Because the queue is processed by the cron, a restore of a big account can wait up to five minutes before it starts. Use Run the queue now on the monitor to start it at once.

Notifications

When the cron finds something you should know, such as a service that was down and restarted, it adds a notification. They show on the Home page and under the bell in the top bar. Opening the bell page marks them as read.

If the cron stops

  1. Service Manager → Cron Heartbeat says Never ran or Late.
  2. On the server run aiohpanel cron --force as root and read the output.
  3. A line with FAIL names the job and the reason. Fix that and run again.
  4. Check that the timer is enabled: systemctl enable --now aiohpanel-cron.timer.

See also Troubleshooting.

Updated 2026-11-02