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
| Where | How |
|---|---|
| Linux server | install.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 crontab | Service 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 hosting | Add a cron job in that host's panel for php /path/to/aiohpanel/bin/aiohpanel cron every minute or every 5 minutes. |
| By hand | aiohpanel 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
| Job | Every | What it does |
|---|---|---|
heartbeat | each run | Writes the time for the Home page. |
services | 5 minutes | Refreshes each service state and starts a monitored one that is down, with a notification. |
bandwidth | 15 minutes | Reads the web server logs and adds traffic to each account. |
disk-usage | 1 hour | Measures each account's disk, inodes, mailboxes and databases. |
bandwidth-limits | 1 hour | Suspends accounts over their bandwidth limit; on the 1st of a month resets the counters and unsuspends them. |
autossl | 1 day | Issues and renews certificates. See DNS and SSL. |
backups | 1 hour | Starts the scheduled backups when one is due. See Services, backups and server settings. |
cleanup | 1 hour | Removes expired temporary IP blocks, old sign-in attempts, old sessions, log rows older than the keep-days setting (90) and old visitor rows. |
license | 12 hours | Checks the licence. See The licence key. |
plugins | 5 minutes | Lets plugins run their own jobs: the Malware Scanner's daily scan, the Cloud Backups transfers, the Firewall's expiring rules. |
tasks | each run | Runs 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
- Service Manager → Cron Heartbeat says Never ran or Late.
- On the server run
aiohpanel cron --forceas root and read the output. - A line with
FAILnames the job and the reason. Fix that and run again. - Check that the timer is enabled:
systemctl enable --now aiohpanel-cron.timer.
See also Troubleshooting.
Updated 2026-11-02