Cron Job Setup
Order Payment Reminders Pro does not send emails by itself — it needs a recurring external call (a cron job) to trigger the reminder engine.
Available since v1.0.0
Without a working cron job, no reminder emails will be sent, no orders will be auto-cancelled, and the admin digest will never arrive.
Overview
Each time the cron URL is called, the module runs through every pending unpaid order and decides what to do:
- Send reminder emails — For each order that has reached the scheduled time for its next reminder, the module sends the configured email.
- Cancel overdue orders — If auto-cancel is enabled and an order has exceeded the configured cancellation deadline, the order status is changed to Cancelled and stock is restored.
- Send the admin digest — If the Admin Digest Email feature is enabled, the module sends a summary of orders approaching their cancellation deadline. This is throttled to once per day regardless of how often cron runs.
All three actions happen in a single cron call. You do not need separate cron entries for each feature.
The cron endpoint is protected by a secret key. Calls without a valid key return a 403 Forbidden response and log an illegal access warning. No email is ever sent from an unauthorized request.
Configuration
When to Run the Cron
Daily at a fixed time is the minimum requirement and works well for most stores. Run it once per day at a time that makes sense for your customers — early morning (for example, 09:00) means reminders arrive during business hours.
Hourly is better when you use hour-based reminder schedules (for example, "send a reminder 12 hours after the order"). If all your reminders are day-based, hourly runs are unnecessary but harmless.
More than once per hour is never needed. The module tracks which reminders have already been sent and will not duplicate them.
Step 1 — Find Your Cron URL in the Back Office
Your unique, secured cron URL is displayed directly in the module configuration.
- Go to Modules > Module Manager, find Order Payment Reminders Pro, and click Configure.
- Click the Cron Jobs tab in the module navigation.
- Look for the URL check and send the emails is: line. The full URL is shown there.
Copy this URL. You will paste it into your cron configuration in the steps below.
The
key=value is a 32-character hex token generated when the module is first installed and stored in your database. It is unique to your store. Never share it publicly or commit it to version control.
URL Format Depends on Your Friendly URL Setting
The module displays the correct URL format for your store automatically. There are two forms:
Friendly URL form (when Friendly URLs are enabled in Shop Parameters > Traffic & SEO > SEO & URLs):
https://yourstore.com/wiretransferreminder/cron?key=a1b2c3d4e5f6...
Standard form (when Friendly URLs are disabled):
https://yourstore.com/index.php?fc=module&module=wiretransferreminder&controller=cron&key=a1b2c3d4e5f6...
Both forms work identically. Always copy the URL exactly as the module shows it — the module automatically picks the right format for your store. The friendly URL form was introduced in v1.3.1 via the moduleRoutes hook.
Step 2 — Choose Your Setup Method
Use whichever method your hosting environment supports. Only one is needed.
- cPanel Cron Jobs — available on most shared hosts (cPanel, Plesk)
- Linux crontab — available when you have SSH access to the server
- PrestaShop Cron Tasks Manager — available as a free module on PrestaShop 1.6 stores
Option A — cPanel Cron Jobs
- Log in to your cPanel and open Cron Jobs.
- Under Add New Cron Job, set the frequency. For daily at 09:00:
- Minute:
0 - Hour:
9 - Day:
* - Month:
* - Weekday:
*
- Minute:
- In the Command field, paste:
curl -s -o /dev/null "https://yourstore.com/wiretransferreminder/cron?key=YOUR_KEY_HERE"
Replace the URL with the full URL you copied from the Back Office.
- Click Add New Cron Job.
For an hourly schedule, set Minute to 0 and Hour to *.
Option B — Linux crontab (SSH)
- Connect to your server via SSH.
- Open the crontab editor:
crontab -e
- Add one of the following lines at the end of the file.
Daily at 09:00:
0 9 * * * curl -s -o /dev/null "https://yourstore.com/wiretransferreminder/cron?key=YOUR_KEY_HERE"
Every hour on the hour:
0 * * * * curl -s -o /dev/null "https://yourstore.com/wiretransferreminder/cron?key=YOUR_KEY_HERE"
Every 3 hours (0:00, 3:00, 6:00, 9:00 ...):
0 */3 * * * curl -s -o /dev/null "https://yourstore.com/wiretransferreminder/cron?key=YOUR_KEY_HERE"
- Save and exit the editor. The cron daemon will pick up the change immediately.
The -s flag suppresses curl progress output. The -o /dev/null discards the response body (which would otherwise end up in your mailbox). If you want to log the output for debugging, replace -o /dev/null with -o /path/to/wr-cron.log.
On some servers
curlmay not be in the default PATH for cron. If the job does not run, use the full path: runwhich curlin your SSH session to find it (typically/usr/bin/curl).
Option C — PrestaShop Cron Tasks Manager (PS 1.6 only)
The free Cron Tasks Manager module (available in the Addons Marketplace) provides an in-browser cron scheduler that works without server-level access. It is shown in the Cron Jobs tab for PrestaShop 1.6 stores.
- Install and configure Cron Tasks Manager if you have not already.
- In Cron Tasks Manager, click Add new task.
- Enter a description such as
Order Payment Reminders Pro. - Paste your cron URL into the Script URL field.
- Set the task frequency to once per day (or once per hour).
- Save.
This method relies on customer traffic to trigger the cron. On low-traffic stores it may not fire at predictable times. For reliable delivery, prefer Option A or Option B.
Settings That Affect What Cron Does
These settings in Configure > Global Configuration determine what the cron run does each time. They are not part of the cron URL setup itself.
| Setting | Where to find it | Effect during cron |
|---|---|---|
| Activate Cancel Orders Feature | Global Configuration tab | Enables automatic order cancellation when orders exceed the deadline |
| Cancel Order after (days) | Global Configuration tab | Number of days after which an unpaid order is cancelled; 0 disables cancellation |
| Admin Digest Email | Global Configuration tab | Enables the daily summary email to the store admin |
| Digest Email | Global Configuration tab | Recipient address for the admin digest; defaults to the shop email |
| Alert Before Cancellation (hours) | Global Configuration tab | Orders within this many hours of cancellation are included in the digest; default 24 |
| Test Mode | Global Configuration tab | When enabled, sends all emails to the test address instead of real customers |
How It Works
When the cron URL is called with a valid key, the module runs through the following steps in order:
- Validates the key — Compares the
?key=parameter against the storedwr_cron_keyvalue. If they do not match, the request is rejected with a 403 Forbidden response and logged. The legacy?token=parameter is also checked for backward compatibility. - Queries unpaid orders — Fetches all orders with a pending payment status for the payment modules you have configured.
- Sends the admin digest (if enabled) — Checks whether a digest has already been sent today. If not, sends one and records the date so it is not sent again until tomorrow, regardless of how often cron runs.
- Processes each order — For every unpaid order:
- If the order has exceeded the global cancellation deadline, it is cancelled and stock is restored (unless Test Mode is on).
- Otherwise, the module checks whether the order is due for its next scheduled reminder and, if so, sends the email.
The module logs a summary after each run. You can find this in Advanced Parameters > Logs filtered by WireTransferReminder.
Security: key= vs token= Parameter
The module accepts two parameter names for authentication:
| Parameter | Status | When to use |
|---|---|---|
?key=YOUR_KEY | Current — preferred | All new cron entries |
?token=LEGACY_TOKEN | Legacy — still supported | Existing cron entries from versions before 1.2.0 |
The key= value is a static 32-character hex token stored in the database (wr_cron_key). It is generated once at installation and never changes unless you uninstall and reinstall the module.
The legacy ?token= parameter used a session-based admin token that could change with each PrestaShop version upgrade or admin user modification. If you have an old cron entry using ?token=, it will continue to work, but updating it to use ?key= is recommended for long-term reliability. To get a fresh ?key=-based URL at any time, go to Configure > Cron Jobs in the Back Office.
Usage Examples
Example: Daily reminders for a wire-transfer store
You sell products where customers pay by bank wire. Set up a cron to run daily at 09:00. Your reminder sequence is: day 3, day 5, day 7 (final warning with auto-cancel). The cron fires each morning, sends the right email to each customer based on how many days their order has been pending, and automatically cancels any order that has gone past day 7.
Example: Hourly reminders for time-sensitive products
You configure a reminder at 24 hours and another at 48 hours after the order. With a daily cron, a customer who places an order at 15:00 might not get their 24-hour reminder until 09:00 the next day — 18 hours late. Switching to an hourly cron ensures the reminder goes out at 15:00 exactly one day later, within an hour of the scheduled time.
Example: External cron service on shared hosting
Your hosting plan does not include cPanel cron. Sign up for a free account at cron-job.org, add a new job, paste the full cron URL from Configure > Cron Jobs, and set the schedule to once per day. The external service makes an HTTP GET request to your store at the configured time, triggering the module exactly as a server-side cron would.
Important Notes
- Match your reminder schedule to your cron frequency. If your earliest reminder is set to "3 days after the order", running cron hourly gives no benefit over daily. If you have reminders set in hours, hourly cron is necessary to deliver them on time.
- Do not run cron more than once per hour. The module is safe to call more than once — it tracks sent reminders and will not duplicate them — but there is no benefit to running it more frequently.
- Suppress cron email output. Most cron daemons send standard output to the system mailbox. Use
-o /dev/nullin curl commands (already included in the examples) to prevent unwanted email. - Test the URL manually first. Before setting up the cron, paste the full URL into your browser while logged out. A working setup returns a blank page or minimal text. A 403 Forbidden response means the key is wrong.
- The cron key is global. It is stored as a global configuration value and applies across all shops in a multi-shop setup. A single cron call processes orders from all shops.
- The friendly URL form requires Friendly URLs to be enabled. If you disable Friendly URLs after setting up a cron using the friendly form, the URL will stop working. Go back to Configure > Cron Jobs and copy the updated URL.
Troubleshooting
| Problem | Solution |
|---|---|
| Reminders are not being sent | Verify the cron job is actually running by checking server cron logs or adding output logging. Also confirm the URL works when opened manually in a browser. |
| Cron returns 403 Forbidden | The key in your cron URL does not match the stored key. Go to Configure > Cron Jobs in the Back Office, copy the URL again, and update your cron entry. |
| Reminders send at the wrong time | Check that your server timezone matches your expectation. Run date via SSH to confirm. Adjust the cron hour accordingly (for example, if the server is UTC and you want 09:00 at UTC+2, set the cron hour to 7). |
| Orders are not being cancelled | Confirm that Activate Cancel Orders Feature is enabled and Cancel Order after is set to a value greater than 0 in Global Configuration. Also confirm Test Mode is off. |
| Admin digest is not arriving | Confirm Admin Digest Email is enabled in Global Configuration. Check that Alert Before Cancellation (hours) is set appropriately — if no orders are within that window, no digest is sent. Also check your spam folder. |
| Cron runs but sends no emails | Check that you have at least one active reminder message configured in the Reminder Messages tab and that orders have been pending long enough to match your schedule. |
curl: command not found in cron logs | Use the full path to curl. Run which curl via SSH to find it, then update the cron command to use the absolute path (for example, /usr/bin/curl). |
| Friendly URL cron gives 404 | Your store may have Friendly URLs disabled. Go to Configure > Cron Jobs and copy the URL as displayed — the module will show the correct form for your store's current setting. |
Frequently Asked Questions
How do I know the cron is actually running?
The simplest check is to open the cron URL directly in your browser while logged out. You should see either a blank page or a short status message — never an error page. After a real cron run, you can also check Advanced Parameters > Logs in your Back Office for entries from WireTransferReminder.
Will calling the cron URL multiple times on the same day send duplicate reminder emails?
No. The module records which reminder has been sent for each order. A second call within the same day will find those orders already processed and skip them. The admin digest is additionally throttled to once per calendar day.
What happens if the cron stops running for several days?
On the next successful cron run, the module processes all orders as if running normally. Orders that have passed the cancellation deadline will be cancelled (if that feature is enabled). Orders due for a reminder will receive their next scheduled reminder, but any intermediate reminders that fell due during the gap are skipped — the module sends the most appropriate reminder for each order's current state.
My hosting does not allow server-side cron. What are my options?
You can use an external cron service such as cron-job.org or EasyCron to call the URL on a schedule. These services make an HTTP GET request to your cron URL at the interval you specify. Paste the full URL from Configure > Cron Jobs into the service's URL field and set the desired frequency.
Can I use the legacy ?token= parameter if I already have it configured?
Yes. The legacy parameter continues to work for backward compatibility. However, the ?token= value can change after a PrestaShop upgrade or user permission change. For long-term reliability, update your cron entry to use ?key= instead, which you can copy from Configure > Cron Jobs.
Is it safe to put the cron URL in a monitoring tool or uptime checker?
Yes, as long as the tool only makes GET requests. The cron endpoint will process pending orders on each call, but with a proper schedule in place there will be nothing extra to process between your scheduled runs. The key in the URL is a secret — do not share it in public dashboards or monitoring status pages that are visible to others.
Does the cron work in a multi-shop setup?
Yes. A single cron call processes orders from all shops. The module filters orders by shop using PrestaShop's built-in shop restriction, so each shop's orders are handled according to that shop's configuration.
Which URL form should I use — the friendly URL or the standard form?
Always copy the URL exactly as shown in Configure > Cron Jobs. The module displays the correct form for your store's current Friendly URL setting. If you later change your Friendly URL setting, return to the Cron Jobs tab and copy the updated URL.
Related Features
- Global Configuration — Enable auto-cancel, configure the admin digest, set test mode
- Reminder Messages — Create and schedule the individual reminder emails that cron sends
- Setup Wizard and Dashboard — The four-step setup checklist, including the cron step