Chatilo
USDPrices shown in US dollars Sign in Start free trial
For platform admins

Set up the background worker (cron)

Add the one cron job Chatilo needs, learn what it does every minute and check that it is running.

Last updated

On this page
  1. Add the cron job
  2. What each run does
  3. Check that it is running
  4. What breaks without it
  5. Common problems

Chatilo does its slow and scheduled work in a background worker, bin/worker.php. Cron starts it every minute. Without it broadcasts do not send, incoming messages are not processed and nothing scheduled happens.

Add the cron job

  1. In CloudPanel, open your site and go to Cron Jobs.
  2. Add a job that runs every minute as the site user, with the command shown below.
  3. Save it and wait two minutes, then check that it runs (see Check that it is running).
* * * * * php /home/SITE_USER/htdocs/YOUR_DOMAIN/bin/worker.php >/dev/null 2>&1

Replace the path with your own. The last screen of the installer and the warning on Overview both show the line with the right path for your server. If your panel asks for the schedule and the command separately, the schedule is * * * * * and the command is everything after it.

Run it as the user that owns the site's files, not as root, so files the worker writes stay writable by the website.

What each run does

Each run takes about 55 seconds, then the next minute's run takes over. Only one worker runs at a time: if the previous run is still going, the new one exits straight away.

  1. Applies any database updates that are waiting. After an update this picks up new tables without any action from you.
  2. Records the time, which is how the admin panel knows the worker is alive.
  3. Starts WhatsApp broadcasts whose scheduled time has come.
  4. Runs the once-a-minute tasks:

    • sends events to customers' webhooks and alert channels, and alerts teams about chats that have waited too long
    • sends booking reminders and follow-ups, and closes past bookings and abandoned booking chats
    • queues changed contacts and closed chats for HubSpot and Zoho CRM
    • checks Revolut subscriptions that have reached their renewal date
    • adds partners' online top-ups whose payer never came back to the site, and looks again at partners whose Premium year has ended
    • sends sequence messages that are due and resumes flows that were waiting
    • starts SMS, Instagram and Messenger broadcasts that are due
    • discards an uploaded update package nobody reviewed within a day
  5. Clears expired rate-limit records.
  6. Works through the job queue for the rest of the minute. Jobs include processing incoming WhatsApp, Instagram, Messenger, Telegram and SMS messages, sending broadcasts, AI assistant replies, webhook deliveries, media downloads, push notifications, invoice emails and CRM sync.

Once an hour it also removes sign-in sessions idle for 14 days, failed jobs older than 30 days and password-reset links older than a day.

A job that throws an error is tried again, up to 3 attempts in total, with a longer wait each time. After the third failure it is marked failed and listed on the System page. A job left "running" for 10 minutes by a worker that died is put back in the queue.

While a software update is being installed the worker does nothing, and resumes by itself afterwards.

Check that it is running

  • System shows a Background worker card: Running with the time it last ran, or Not running. It counts as running when it was seen in the last 3 minutes.
  • Overview shows a Jobs waiting card with "Worker last ran … ago". If the worker has not been seen for 3 minutes, a warning appears at the top: The background worker isn’t running.

To test by hand, run a short pass over SSH as the site user:

php /home/SITE_USER/htdocs/YOUR_DOMAIN/bin/worker.php 5

The number is how many seconds to work the queue. With 5 or less the worker prints Processed N job(s). when it finishes.

What breaks without it

  • Scheduled and immediate broadcasts stay queued.
  • Incoming messages arrive at the webhook but are not processed into the inbox.
  • AI replies, sequences, flows that wait, booking reminders, alerts and CRM sync stop.
  • Invoice emails are not sent.
  • A partner's online top-up is not added if they closed the tab after paying, until the worker runs again. Partner tiers are not reviewed.
  • Revolut renewals are not picked up.

Common problems

"The background worker isn’t running."

The cron job is missing, uses the wrong path, or runs with a PHP that lacks an extension. Run the command by hand over SSH and read the output. Chatilo is not installed yet. means the path points at a copy that has not been installed.

Jobs waiting keeps growing

The worker runs but cannot keep up, or one job fails again and again. Open System and look at Failed jobs and Today’s log. See Use the System page.

The worker runs but nothing happens during an update

That is expected. If an update was cut short, the worker stays paused until you clear it. See Install a software update.

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy