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
rootprivileges, see if a crontab is already set up.crontab -u <Magento file system owner user name> -lFor example, on CentOS
crontab -u magento_user -lIf 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> -eAn 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:runwhere
<path-to-binary>is the absolute file system path to your PHP binary (usewhich phpto find it)<ini-file-path>is the path to aphp.inifile to use for the cron job; generally, you should use the web server plug-in鈥檚php.inifile. To find it, create aphpinfo.phpfile.
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