Run TruCMS’s recurring maintenance reliably with one server cron job.
TruCMS has recurring housekeeping jobs that must run even when nobody is browsing the website. Instead of creating a separate cron job for every task, the server calls the TruCMS scheduler once per minute. TruCMS then decides which registered tasks are due.
If the scheduler is not running, the website still appears online, but these background jobs quietly stop. The most visible signs are pages that do not refresh after you change a provider or product, expired payments that are not cleaned up, and held stock that is never released.
Set this up once and leave it running
The same entry keeps working when TruCMS or a plugin adds another scheduled task in a future update. You never need to add a second cron job.
| Task | How often | What it does | Needs |
|---|---|---|---|
| Refresh pages with data-bound sections | Every hour | Re-checks every page built from data-bound sections (providers, services, products, posts) and updates it if its data changed. A safety net next to the automatic update that happens when you edit a record. | Core |
| Clean up unpaid booking payment attempts | Every hour | Cancels booking payment attempts that were never completed and removes old cancelled ones, so held time slots return to the calendar. | Booking |
| Renew calendar sync subscriptions | Daily at 03:20 | Renews the connection that lets Booking learn about changes in a provider’s linked calendar, before it expires. | Booking |
| Expire checkout attempts | Every 15 minutes | Closes shop checkouts that were started but not finished. | TruCommerce |
| Release held stock | Every 15 minutes | Returns stock that was held for an unfinished checkout to the shelf. | TruCommerce |
| Clean up shop data | Daily at 02:10 | Removes expired or draft shop records that no longer need to be kept. | TruCommerce |
| Refresh shop caches | Daily at 02:30 | Rebuilds shop caches and derived product information. | TruCommerce |
| Generate missing product image sizes | Daily at 03:00 | Creates any product picture sizes that are missing so shop pages load quickly. | TruCommerce |
Tasks of a plugin appear only while that plugin is active. All times are in your server’s time zone.
Not scheduled by default
Support tickets are not closed automatically, and emails are sent as they happen, not by the scheduler. If you set up background processing for emails and notifications, that is a separate worker; see Queue & Background Jobs.
If you are unsure about the path or the PHP executable, ask your host. Shared hosts often show both in the hosting control panel.
Create one cron entry that runs every minute:
* * * * * cd /home/USERNAME/path-to-trucms && /usr/bin/php artisan schedule:run >> /dev/null 2>&1Replace /home/USERNAME/path-to-trucms with the real TruCMS folder and, if necessary, /usr/bin/php with the PHP command-line path supplied by your host.
Do not point the command at the public folder
The command runs from the TruCMS folder, not from the website’s public document root.
* * * * *.cd … && php artisan schedule:run command with your subscription’s paths.Edit the cron table of the account that runs the website (crontab -e on most Linux servers) and add the same once-per-minute entry.
From the TruCMS folder, these two commands are useful after setup:
php artisan schedule:list
php artisan schedule:runschedule:list shows every recurring task and when it will next run; the list should match the table above for the plugins you use. schedule:run performs the same check cron will perform, and should finish without an error. Test again after moving servers or changing the PHP version.
| Symptom | What to do |
|---|---|
| Pages do not update after I edit a provider or product | The automatic update needs no cron, but the hourly safety net does. Check the cron entry; then open the page in the Page Builder and save it once. |
| Time slots stay blocked after an abandoned payment | The hourly booking clean-up is not running. Check the cron entry and the PHP path. |
| Cron runs but nothing happens | The PHP command-line version may differ from the web version, or the path points to the wrong folder. Run the command by hand and read the message. |
schedule:list shows no tasks | You are in the wrong folder, or the application cannot start (for example a database connection problem). Check the site loads. |
Uploading TruCMS · Queue & Background Jobs · Data-Bound Sections