Log in to the server via SSH. Run crontab -e
command to add a cron task.
Add these lines on file:
MAILTO="webmaster@example.com"
*/5 * * * * php -f /var/www/html/cron.php
0 2 * * * php -f /var/www/html/shell/indexer.php reindexall
0,30 * * * * php -f /var/www/html/shell/indexer.php -- -reindex cataloginventory_stock