To create a support ticket, start a search

Automating exports with a CRON task

mars_article_03.jpgCRON is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates

It is indeed interesting to get the system to run recurent and repetitive tasks automatically instead of involving a manual intervention by the user.

Here is how you can make your life easier by automating your exports using a CRON task.

  1. Configure your CSV export once to check that it works when ran manually
  2. Download the attached file
  3. Unzip the file and rename it cron_export_YYY.php (choose an recognisable name)
  4. Edit the file to configure it

The first lines allow to modify the configuration:

// Export script name, all options must be set and tested in Store Commander. (case sensitive)
// Export scripts are stored in /modules/storecommander/XXXX/SC_TOOLS/cat_export/

// internal security key to use in CRON ( you should call /modules/storecommander/XXXX/SC/cron_export_YYY.php?s_key=4hfsz65j4e68h4reh )


// the export result is sent to this email address

// email title
$emailtitle='[CRON] Export SC';

// website url for the link inluded in the email.

** Do not modify the following lines **

IMPORTANT Note : Do not use the security key above as it is used as an exemple for this article.

Then, add the file on your server in directory /modules/storecommander/XXX/SC/cron_export_YYY.php

You will then simply call this URL with the CRON task on your server:


Related articles