Magento – Log Cleaning does not work

cronlogmagento-1.8windows

I turned on Log Cleaning (under System -> Configuration -> System -> Log Cleaning). This is my configuration:

Log Cleaning Configuration

I set a Scheduled Task (I'm on Windows) to send a request to cron.php every 5 minutes. But nothing happens. I checked cron_schedule table and it didn't scheduled either. I also checked log_quote (and other log tables) and nothing cleaned.

What should I do to make it work?

Best Answer

Kick off the log cleaning yourself, manually (or set up in a CRON as I usually do):

Usage:  php -f log.php -- [options]
        php -f log.php -- clean --days 1

  clean             Clean Logs
  --days <days>     Save log, days. (Minimum 1 day, if defined - ignoring system value)
  status            Display statistics per log tables
  help              This help

So, to clean the log fully pass the flag option clean with a number of days to clean:

php -f shell/log.php clean --days 7
Related Topic