Set up cron jobs
To enable the updater to work for both the Component Manager and System Upgrade, you must configure two cron jobs. Each cron job should run every minute.
Enable the cron jobs as crontabs for the Magento file system owner because that user runs the updater application for the Component Manager and System Upgrade.
-
As a user with
root
privileges, see if a crontab is already set up.crontab -u <Magento file system owner user name> -l
For example, on CentOS
crontab -u magento_user -l
If no crontab has been set up for the user, the following message displays:
no crontab for magento_user
-
If necessary, set up the crontabs as follows as a user with root privileges:
crontab -u <Magento file system owner user name> -e
An editor displays. In the editor, enter the following:
*/1 * * * * <path-to-binary> -c <ini-file-path> <your Magento install dir>/update/cron.php */1 * * * * <path-to-binary> -c <ini-file-path> <your Magento install dir>/bin/magento setup:cron:run
where
<path-to-binary>
is the absolute file system path to your PHP binary (usewhich php
to find it)<ini-file-path>
is the path to aphp.ini
file to use for the cron job; generally, you should use the web server plug-in鈥檚php.ini
file. To find it, create aphpinfo.php
file.
For example,
*/1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini /var/www/magento2/update/cron.php */1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini /var/www/magento2/bin/magento setup:cron:run
-
Save your changes to cron and exit the editor.
Find us on