How to set up the scheduled tasks (cron) for Salon Booking OS
4 min read
Salon Booking OS by OsDotâ„¢ sends its messages, checks its payments, keeps its client records up to date and keeps its data tidy with a few console commands. Your hosting’s scheduler (cron) runs them; the product never creates a scheduled task itself. Bookings stay correct without them — an unpaid hold stops blocking its time the moment it expires, and a one-time code is refused once it has expired — but without them no e-mail, reminder or text message goes out, and payments a provider has not confirmed yet are not checked again.
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 checkIt 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 lines below.
The cron lines #
Replace /path/to/your/site with the folder that holds bin/cake.php. Each 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 each 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 booking expire-holds
17 * * * * php /path/to/your/site/bin/cake.php booking prune --limit=1000
41 3 * * * php /path/to/your/site/bin/cake.php media cleanup
53 3 * * * php /path/to/your/site/bin/cake.php auth otp-prune --days 30
*/5 * * * * php /path/to/your/site/bin/cake.php commerce reconcile
* * * * * php /path/to/your/site/bin/cake.php communication work
7 * * * * php /path/to/your/site/bin/cake.php salon daily-summary
*/10 * * * * php /path/to/your/site/bin/cake.php clients syncThe 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| 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 | every night | 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 | every night | 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. |
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), work in bounded batches, and are skipped — not failed — while the site is in maintenance. Run media cleanup, auth otp-prune and license renew once a day, at a quiet time.