cancel
Showing results for 
Search instead for 
Did you mean: 

Re:Cron Job

Re:Cron Job

I am working on my new site www.jewelrynest.com and i try to index but it does not index,

my php version is 7.01 as i know

And i can not index it so i am not be able to update any thing

Please Advice

JewelryNest
1 REPLY 1

Re: Re:Cron Job

Hello @JewelryNest,

 

 

Please login via terminal and follow below steps

 

Find the PHP binary and php.ini path
To display the path to your PHP binary, enter

which php

A sample result follows:

/usr/bin/php


Create the cron job
To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:

crontab -u <Magento file system owner username> -e

For example,

crontab -u magento_user -e

A text editor displays. (You might need to choose a text editor first.)

* * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <magento install dir>/var/log/magento.cron.log
* * * * * <path to php binary> <magento install dir>/update/cron.php >> <magento install dir>/var/log/update.cron.log
* * * * * <path to php binary> <magento install dir>/bin/magento setup:cron:run >> <magento install dir>/var/log/setup.cron.log

where

  • <path to php binary> is the absolute file system path to your PHP binary
  • <magento install dir> is the directory in which you installed the Magento software; for example, /var/www
  • | grep -v "Ran jobs by schedule" filters this message from the log, making any errors easier to spot

 

The first command (magento cron:run) reindexes indexers, sends automated e-mails, generates the sitemap, and so on. Usually it’s associated with the PHP command line .ini file. The other two commands are used by the Component Manager and System Upgrade.

 

For example, if the PHP binary is located in /usr/bin, you installed Magento in /var/www/magento2, enter

* * * * * /usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/magento2/update/cron.php >> /var/www/magento2/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/magento2/bin/magento setup:cron:run >> /var/www/magento2/var/log/setup.cron.log

--
If my answer is useful, please Accept as Solution & give Kudos