Skip to content
OpenCart · User manual

Reviews Pro

Version 1.0.7 Product page
Chapter 12

Cron job

How Reviews Pro sends its e-mails without a cron job, why a scheduled task is recommended, and how to create it.

How e-mails are sent without a cron job

No cron job is required. While people visit your store, the module does its work in the background at most once every five minutes: it sends the requests, reminders, coupons, confirmations and notices that are due, and refreshes the ratings shown in the store. The visitor's page does not wait for it.

This has two limits:

  • when nobody visits the store, for example at night, nothing is sent until the next visit;
  • each of those runs sends a small batch of at most 10 e-mails of each kind.

A scheduled task removes both: e-mails leave on time, and each run sends up to 50 e-mails of each kind.

Finding the address

  1. Open DevmanExtensions → Reviews Pro and go to the Summary tab.
  2. Open Scheduled task (optional) at the bottom.
  3. Copy the address shown there. It is an address of your own store that ends with a key.

Creating the cron job

Create a cron job in your hosting control panel (cPanel, Plesk or similar: look for Cron jobs or Scheduled tasks) that opens the address every 5 to 15 minutes.

With curl, every 10 minutes:

*/10 * * * * curl -s "PASTE-THE-ADDRESS-HERE" > /dev/null 2>&1

With wget:

*/10 * * * * wget -q -O /dev/null "PASTE-THE-ADDRESS-HERE"

Replace PASTE-THE-ADDRESS-HERE with the address you copied and keep the quotation marks: the address contains & characters that the command line would otherwise misread.

If your hosting panel has separate fields for the schedule, choose "every 10 minutes" and paste only the command, from curl or wget onwards. If your hosting offers no cron jobs, any external service that opens an address on a schedule works as well.

Checking that it works

Open the address once in your browser. A working answer is a short line of text such as:

{"orders":0,"products":0,"sent":0}
ValueMeaning
ordersOrders that have just been registered for a review request.
productsProducts whose rating has just been refreshed in the store.
sentE-mails sent to customers in this run.

The answer {"served":false} means Reviews Pro is switched off in that store or the store is not linked. An empty answer {} means the key in the address is not the right one: copy the address again from the Summary tab.

Multi-store

Each store of a multi-store OpenCart has its own address and sends only its own e-mails. Choose each store in the Store selector, copy its address, and create one cron job per store. See Multi-store and languages.

Still need help?

Open a support ticket from your account and our team will look at your store with you.