These indexers will run at the schedules list below automatically. No need to have a custom cron job setup. Keep indexers at "Update When Scheduled"
enterprise_targetrule_index_reindex
<cron_expr>0 * * * *</cron_expr>
enterprise_search_index_reindex_all
<cron_expr>0 3 * * *</cron_expr>
catalogrule_apply_all
<cron_expr>0 1 * * *</cron_expr>
sales_clean_quotes
aggregate_sales_report_order_data
aggregate_sales_report_shipment_data
aggregate_sales_report_invoiced_data
aggregate_sales_report_refunded_data
aggregate_sales_report_bestsellers_data
aggregate_sales_report_tax_data
<cron_expr>0 0 * * *</cron_expr>
core_clean_cache
<cron_expr>30 2 * * *</cron_expr>
enterprise_catalog_index_refresh_price
<cron_expr>0 * * * *</cron_expr>
enterprise_page_cache_crawler
<cron_expr>0 3 * * *</cron_expr>
catalog_product_index_price_reindex_all
<cron_expr>0 2 * * *</cron_expr>
Note: if I'm missing any let me know :)
sudo service crond status
sudo service crond restart
Add this to top of cron to test it if it is running. If it is you will get an email every 1 minute.
MAILTO="[email protected]"
* * * * * echo testing
If you have Aoe_Scheduler installed you can try manually generating a heartbeat:
cd shell/
# generate a heartbeat manually
php scheduler.php -action runNow -code aoescheduler_heartbeat
Some other Aoe_Scheduler commands that might be helpful:
php scheduler.php -action listAllCodes
php scheduler.php -action lastRun -code aoescheduler_heartbeat -secondsFromNow
php scheduler.php -action scheduleNow -code aoescheduler_heartbeat
If you are scratching your head trying to figure out why crons are not running it could be you have an existing cron process that is still running and needs to get killed. The cron.sh file that is used by magento checks the currently running processes, and if one already exists it quietly exits.
ps aux | grep "cron.sh"
# if you see one you can kill it
sudo kill -9 PIDNUMBER
Cron format is:
minute hour day month day-of-week
* * * * * -> Execute every minute
0 * * * * -> Execute every Hour
0 0 * * * -> Execute every mid-night
0 0 0 * * -> Execute every Month
0 0 0 0 * -> Execute every Weekday