Cron and pending reservations
The Simple BnB Rental plugin uses an automatic system to keep reservation statuses in sync over time. These operations are handled by the WordPress cron, a mechanism that runs scheduled actions in the background (every few minutes).
1. What the cron does
The plugin’s cron runs two main checks:
- Expire pending reservations
It automatically cancels reservations that were not confirmed within a given time. - Auto-complete finished stays
It marks as completed all confirmed reservations whose checkout date has passed.
2. What a “pending” reservation is
A pending reservation is a booking request that has been created but not confirmed yet (for example because the payment was not completed, or the email confirmation was not done).
While a reservation is pending, that room’s availability may or may not be blocked for other guests, it depends on your settings.
3. Block availability or not
The option “Hold inventory for pending reservations” lets you choose your booking policy:
| Mode | Description |
|---|---|
| Block ON | Rooms with a pending reservation are shown as not available to other visitors until the pending one is confirmed or expires. This is recommended for small properties that want to avoid double bookings. |
| Block OFF | Pending reservations do not block availability. Other users can book the same room for the same dates. In practice, the one who completes (pays/confirms) first gets the room. |
💡 Choose according to your workflow: if you want to “protect” availability as soon as someone starts a booking, keep it ON; if you prefer a “first to complete wins” strategy, keep it OFF.
4. Pending timeout
The “Pending timeout (minutes)” option defines how long a reservation can stay in the pending state.
After that time, the cron considers it expired and automatically sets it to cancelled.
Example: with a 30-minute timeout, if the guest doesn’t pay or confirm within 30 minutes, the reservation is cancelled automatically and the room becomes available again.
Cancelled reservations stay visible in the reservations table with the status “Cancelled”.
You can remove them permanently using the “Delete all cancelled reservations” button.
5. Automatic completion of reservations
The cron also checks all reservations with status confirmed.
When the checkout date is in the past, the cron automatically updates the status to completed. This keeps your reservations list tidy without manual work.
6. Run frequency
The plugin registers a custom cron interval of 5 minutes (simpbnb_5min).
Every 5 minutes:
- pending reservations are checked and, if expired, set to cancelled;
- confirmed reservations whose checkout is in the past are set to completed.
The WordPress cron runs when the site receives visits. If your site has very low traffic, you can set up a real server-side cron (from your hosting panel) to make sure tasks always run.
7. Practical tips
- Use a timeout of 15–30 minutes for a good balance between flexibility and calendar cleanliness.
- If you get lots of daily bookings, a shorter timeout prevents “forgotten” pending reservations from blocking rooms.
- Make sure WordPress cron is enabled (i.e.
DISABLE_WP_CRONis not set totrueinwp-config.php).
8. Summary
| Feature | Description |
|---|---|
| Pending expiry | Automatically cancels pending reservations after the configured time. |
| Auto completion | Marks confirmed reservations as completed once checkout has passed. |
| Cron interval | Every 5 minutes. |
| Related options | “Hold inventory for pending reservations” and “Pending timeout (minutes)”. |