Catalog rules daily update doesn't work

Recently I had the same problem when I was testing a new price rule for our project. And the reason of my headache was that I did not notice that every time when you create a new rule or edit some of the existing rules - you should press "Apply Rules" button to make Magento know about your rule changes.


Making sure to hit "Apply Rules" is not always enough. I recently discovered that if cron is not set up properly, at some point in the future, the rules will not be applied.

I was unable to really nail down when the rules stopped working. In my case I had a handful of rules that are applied based on customer group (wholesale).

  1. Check the cron_schedule table. Make sure you have some entries here corresponding to catalogrule_apply_all (I think that's the process name).
  2. Set the cronjob in the CatalogRule module's config.xml file to run every minute or so (for testing) with */1.
  3. Look back at the cron_schedule table, and keep reloading it every couple of minutes. You should see new processes get added/executed automatically without ever having to manually hit your store's cron.php file.
  4. If you aren't seeing any of the processes update manually, SSH into the site as the user who owns the site's files. From a command line: crontab -e (you may be in Vim and not know what to do, I suggest google on using basic Vim commands).
  5. Set the crontab to run: */1 * * * * /path/to/your/cron.sh
  6. Now check the cron_schedule table again to make sure that cron processes are executing automatically.
  7. Hopefully, all is good at this point. Go ahead and go back and set your cron processes to run at the desired intervals.

Check if the job gets scheduled

You can do this by either checking the database or install this extension: Aoe_Scheduler

Test if the job works

Create a php script run_my_rules.php and put in there only the content for the function: dailyCatalogUpdate then run that from the console. See what is happening.