Skip to content
OpenCart · User manual

Import Export PRO

Version 9.14.16 Product page
Chapter 11

CRON jobs

How to run import and export profiles automatically: the CRON Jobs tab in the store and the scheduled task on your server, with the exact command.

How it works

A CRON job has two parts. In the store, the CRON Jobs tab says which profiles may run automatically and who receives the report. On your server, a scheduled task calls the extension with the ID of the profile at the times you choose.

Profiles that can run by CRON

  • Import profiles that get the file From URL or From external Server, or in Google Spreadsheet format. A profile set to I will upload it manually cannot run by CRON.
  • Export profiles whose file is Saved to my server or Saved into external server, or in Google Spreadsheet format. A profile set to Downloaded from my web browser cannot run by CRON.
  • Migration profiles saved in the Migrations or Backups tab. See Migrations and backups.

The CRON Jobs tab

Add one row per profile.

ColumnWhat it does
ProfileThe profile to run. A profile can appear only once.
StatusMust be enabled for the scheduled task to be accepted.
Report emailAddress that receives a report each time the profile finishes. Leave it blank for no report.
Report errors emailAddress that receives a message when the run fails. Several addresses can be separated by commas.
Quick tutorialOpens About CRON Jobs with the path, arguments and commands of that row, ready to copy.

Press Save CRONs configuration after any change.

The command

Open Quick tutorial in the row of the profile and copy the values from there: they already contain the real path of your store and the ID of the profile. The formats are these.

OpenCart 1.5.x to 3.x:

PATH_TO_PHP /path/to/store/admin/model/extension/module/ie_cron_jobs.php action=cron_start profile_id=12

OpenCart 4.x:

PATH_TO_PHP /path/to/store/extension/devman_import_export_pro/admin/controller/cron.php profile_id=12
  • PATH_TO_PHP is the path of PHP on your server. Common values are /usr/bin/php, /usr/local/bin/php and /usr/local/cpanel/3rdparty/bin/php. Ask your hosting company if you are not sure.
  • 12 is the ID of the profile. It is shown next to the profile name in every list of profiles.
  • On OpenCart 4 the command must run with PHP 8 or higher.

Option 1: hosting panel

In a panel such as Plesk or cPanel, create a scheduled task that runs a PHP script. Paste the path from Copy path as the script, the text from Copy arguments as its arguments (for example action=cron_start profile_id=12), choose when it runs and save.

Option 2: crontab by SSH

  1. Connect to your server by SSH and run crontab -e.
  2. Paste one line per profile: the schedule followed by the command.
  3. Save and close the editor.
*/15 * * * * PATH_TO_PHP CRON_PATH CRON_ARGUMENTS
0 0 * * * PATH_TO_PHP CRON_PATH CRON_ARGUMENTS
0 */12 * * * PATH_TO_PHP CRON_PATH CRON_ARGUMENTS
0 0 * * 0 PATH_TO_PHP CRON_PATH CRON_ARGUMENTS

In order: every 15 minutes, once a day at 00:00, twice a day at 00:00 and 12:00, and every Sunday at 00:00. The Copy example links of the tutorial give these lines with CRON_PATH and CRON_ARGUMENTS already filled in; you only replace PATH_TO_PHP.

Option 3: wget

If the server cannot run the PHP file directly, call it by URL. Create a task of the type "command" and paste the command from Copy next command.

OpenCart 1.5.x to 3.x:

wget "https://www.yourstore.com/admin/model/extension/module/ie_cron_jobs.php?action=cron_start&profile_id=12"

OpenCart 4.x:

wget "https://www.yourstore.com/extension/devman_import_export_pro/admin/controller/cron.php?profile_id=12"

Testing a CRON job

At the bottom of About CRON Jobs, the link under Execute this CRON Job manually opens the same URL in a new browser tab and runs the profile once. You are logged out of the administration when you use it.

Then check the result:

  • The Import logs tab shows the run with the source CRON.
  • The report arrives at Report email, with the profile ID and name and the summary of the process.

Leave enough time between runs for the previous one to finish, and schedule heavy imports for the hours with fewest visitors.

Still need help?

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