Cron allows you to schedule actions ahead. It is convenient to use Cron when it it necessary to perform daily repeated tasks in the Magento System. For instance, MailChimp (newsletter) subscribers updates, back-ups, or clearing logs at the end of each month.
Cron will automatically do all the scheduled actions, i.e. you will not have to do it manually. For example, without a Magento cron job set-up, you will have to manually refresh the catalog price rules and catalog indices several times a day. If you have a large store this can take a long time to perform, whereas forgetting to do it could lose you money.
Below you will learn how to set up the Cron service, that will automatically launch different tasks according to the schedule.
First, consider the path to the root category of your store. For instance, /var/www/your_website_domain_name/web/. You have to set the cyclic execution of the file cron.sh in the root category. For instance /var/www/your_website_domain_name/web/cron.sh. If you have access to ssh, and there is no corresponding functionality in your Hosting Admin panel, follow the tips below.
Open the Cron tab, where Cron commands are set.
In order to open the Cron tab under your ssh account, enter following command:
If you want to open the Cron tab under someone else’s account, enter this command:
crontab -u USERNAME -e
Where the “USERNAME” is a login of a person you want to launch the cron job.
Enter your command at the end of the file:
*/5 * * * * sh /var/www/your_websitesite_domain_name/web/cron.sh
close and save.