---
title: How to set up the scheduled tasks (cron) for Salon Booking OS
description: "Add the cron lines that send messages, check payments and keep data tidy, and check that the command-line PHP is the right one."
url: "https://osdots.com/docs/salon-booking-os-scheduled-tasks-cron/"
updated: "2026-11-01"
category: Product Documentation / Salon Booking OS by OsDot™
---

# How to set up the scheduled tasks (cron) for Salon Booking OS

Salon Booking OS by OsDot™ sends its messages, checks its payments, keeps its client records up to date, completes account deletions, publishes reviews and keeps its data tidy with a few console commands. Since version 1.1 **one scheduled task** runs them all: your hosting's scheduler (cron) starts it every minute, and it runs each command when that command is due. The product never creates a scheduled task itself. Bookings stay correct without it — an unpaid hold stops blocking its time the moment it expires, and a one-time code is refused once it has expired — but without it no e-mail, reminder or text message goes out, payments a provider has not confirmed yet are not checked again, account deletions do not complete by themselves and reviews do not publish themselves.

## Check the command-line PHP first

Hosting often has a different PHP on the command line than for the website. Run once, with your site's folder in place of `/path/to/your/site`:

```
php /path/to/your/site/bin/cake.php upgrade check
```

It must report PHP 8.3 or later with the same extensions as the website. If your hosting has no terminal, add it as a one-off cron job, read the result in the cron e-mail or log, then remove that job.

If it reports an older PHP, or says that `php` is not found, the command line uses another PHP than the website. Ask your host for the path of PHP 8.3 or later on the command line (hosts often name it after the version, for example `php83` or `ea-php83`; on Hostinger it is `/opt/alt/php83/usr/bin/php` for PHP 8.3, while its plain `php` is an older version) and write that path instead of `php` in the line below.

## The cron line

Replace `/path/to/your/site` with the folder that holds `bin/cake.php`. The line names `bin/cake.php` by its full path and needs no `cd` and no quotes, so it works in every hosting panel — some run the command without a shell, where a line starting with `cd … &&` never runs. The installer's last page shows the task's schedule and command with this installation's own folder already filled in, each in its own field with a **Copy** button (paste the schedule, a space, then the command), and they are shown again any time to the owner under **Overview → Get started** and **System → Before you go live**.

```
* * * * * php /path/to/your/site/bin/cake.php schedule run
```

Run it every minute. Where your hosting allows no more, every 5 or 15 minutes works too: messages then go out in larger batches. Each run starts every command that is due, one after the other; a command that fails is recorded and the next one still runs. Only one run works at a time, and nothing runs while the site is in maintenance. To see when the last run came and how each command ended, run `php /path/to/your/site/bin/cake.php schedule status` (it reports "late" when no run came for 20 minutes).

**Updating from version 1.0?** Version 1.0 had eight cron lines, one per command. They keep working, but the tasks new in 1.1 (deletions, reviews and the CSV clean-up) run only through `schedule run`. After the update, delete the eight lines and add the one line above — **System → Before you go live** shows it with your folder filled in. Do not keep both: each command would then run twice as often.

The licensed edition adds one more line, which the installer's last page and **System → Before you go live** show:

```
17 3 * * * php /path/to/your/site/bin/cake.php license renew
```

What `schedule run` runs, and how often:

| Command | When | What it does |
| --- | --- | --- |
| `booking expire-holds` | every minute | Expires holds whose deposit was not paid in time (10 minutes by default) and releases their time for other clients. |
| `booking prune --limit=1000` | every hour | Removes calendar time cells 30 days after an appointment ended, booking links that can no longer open anything (a used link 48 hours after its use), and the address of a home visit once its keeping time has passed (90 days after the visit by default). Appointments and their history stay. |
| `media cleanup` | once a day | Ends uploads that were never finished, once their time is up (their parts are deleted), and expired download links. Finished files stay. |
| `auth otp-prune --days 30` | once a day | Removes the records of one-time codes (and of the short permissions a code gave) 30 days after they expired. Accounts, appointments and the audit log stay. |
| `commerce reconcile` | every 5 minutes | Asks the payment provider again about payments it has not confirmed yet, and closes unpaid orders that have expired. |
| `communication work` | every minute | Sends the e-mails, text messages and push notifications that are due — confirmations, reminders, receipts — and records what happened (**Messages**). |
| `salon daily-summary` | every hour | Once 7:00 has passed in the salon's time zone, prepares the owner's daily summary, when it is switched on. It goes out once a day. |
| `clients sync` | every 10 minutes | Adds the clients of new bookings and orders confirmed with a code to the client records (**Clients**). The clients list also does this when it opens. |
| `people deletions` | every hour | Completes the account deletion requests whose deadline has come (14 days after the request at the latest; see **Clients and their data**). |
| `reviews publish` | every hour | Publishes the reviews whose waiting days are over, unless they were hidden (see **Reviews**). |
| `csv cleanup` | once a day | Discards imports left unfinished for more than 7 days and removes exports 24 hours after they were made, with their files (see **Import and export (CSV)**). |
| `license renew` | every night (the licensed edition) | Confirms the software license with the publisher's license server (**System → Software license**). |

The booking commands and the message worker each do one run at a time (a second copy started meanwhile stops) and work in bounded batches. The licensed edition's `license renew` keeps its own line: run it once a day, at a quiet time.

Since 1.1.1 several OsDot sites on one database server each run their own scheduled tasks.
