CRON

NitroPack allows you to carry out specific tasks periodically with the help of CRON jobs. More information on CRON jobs can be found here:

http://en.wikipedia.org/wiki/Cron

To configure CRON jobs, navigate to OpenCart Admin Panel > Nitro > Settings > CRON.

Local CRON

This is the standard mode in which you will be using NitroPack CRON jobs. Note that your PHP server needs to be able to run the exec() command and crontab must be installed on the server, otherwise NitroPack will not be able to set up a CRON job for you.

cron

NitroPack provides you with the following settings:

1. Local CRON status (Enabled / Disabled) - This is the main CRON switch. It controls whether NitroPack's cron script will run or not. This means that even if you setup a CRON job manually, via cPanel for example, NitroPack will abort the cron script execution if this option is disabled. The same applies for remote CRONs.

2. Local CRON frequency - Choose which days of the week and on what time you want to execute the CRON script. The recommended setup is to run it daily at your least busy hours. In most cases running it at 04:00 AM is a good option.

3. Local CRON behavior - Choose what you would like the local CRON job to do. Currently it can do the following things:

  • Delete outdated NitroPack cache files. This applies for: PageCache, Minification, Database Cache

  • Pre-Cache sitemap pages: home page, categories (up to level 3), information pages, special offers

  • Send an e-mail to server administrator after task completion

4. Path to the PHP binary - The PHP binary is the program that executes the CRON script. On most servers this program is installed in the following path /usr/local/bin/php and we have set this as the default value for this field. If your PHP binary is installed in a different location, you can use this field to point NitroPack to the correct path. *Hint: Another popular location is /usr/bin/php.

5. Local CRON command - If you are setting up your CRON manually, via cPanel's CRON management tool for example, you can copy the command line shown in this field in the cPanel's command field.

NoteThis command line is updated when you save the changes, so make sure to click Save changes on the top right before copying the text from this line, in order to get the correct command.

Remote CRON

remote_cron

If you cannot use server-side CRON job, you can use a third-party CRON service. Such a service would call a URL on your website, which would execute the CRON tasks.

The following settings are available:

1. Remote CRON URL - The third-party CRON services ask you for a URL which they need to call periodically. This is where NitroPack shows you the generated unique URL, which should be pasted in the remote CRON service.

IMPORTANTMake sure to click Save changes on the top right before using the generated URL.

2. Remote CRON behavior - Choose what you would like the remote CRON job to do. Currently it can do the following things:

  • Delete outdated NitroPack cache files. This applies for: PageCache, Minification, Database Cache

  • Send an email to server administrator after task completion