MageDirect

How to setup Magento Cron

Cron jobs are a significant part of each Magento store. It uses for sending emails, import/export tools, indexing etc. That’s why it is important to configure crontab in the right way.

Configure crontab

First of all, we’ll introduce how to configure crontab:

Go to the terminal and type:

This command will open configuration file for editing. In this file, you should enter instructions for cron in the text format:

For example, for executing a command every 15 minutes we need to type:

More details about time format you can find here https://en.wikipedia.org/wiki/Cron

Configure crontab for Magento 1.x

For configuring crontab for Magento 1.x, open crontab configurations by typing

Add the next line:

Don’t forget to change /path/to/folder to real path to Magento folder.

Configure crontab for Magento 2.x

For configuring crontab for Magento 2.x, open crontab configurations by typing

Add next lines:

Don’t forget to change /path/to/folder to real path to Magento folder.

Was this article helpful?
Dislike 0
Views: 37
Ihor Klymchuk

Ihor KlymchukTechnical Lead

Rate us
1 Star2 Stars3 Stars4 Stars5 Stars
(6 votes, average: 4.83 out of 5)
rating-magedirectLoading...
Bottom Top