How to setup a cronjob to clear the cache in CS-Cart. Print

  • 3

CS-Cart does not officially provide a specified cron script for clearing the cache. However, we have found that the following cronjob entry will work.

### Generate the Google Sitemap
15 7 * * * find /path/to/var/cache -type f -exec rm -Rv '{}' \;

If you are not familiar with adding/editing cron entries on your server, please contact your server administrator or hosting company support for assistance. The above cron entry will typically need to run under the root crontab if you are in a jailshell environment.

Note: for the above cron entries:
- Replace /path/to/var/cache with the full system path to your cs-cart /var/cache directory for your CS-Cart installation.
- The cron entry is set to run at 7:15AM EDT. However, you can change the 7 to whatever hour (1 to 23) ... and the 15 to whatever minute (00 to 59) that you would like it to run.


Was this answer helpful?

« Back