cancel
Showing results for 
Search instead for 
Did you mean: 

Component Manager/System Upgrade Readiness Check fails- Check Cron sripts

Component Manager/System Upgrade Readiness Check fails- Check Cron sripts

This is the message I get "Check Cron Scripts

Cron script readiness check failed.

Error from Setup Application Cron Script:
Cron job has not been configured yet
Other checks will fail as a result (PHP version, PHP settings, and PHP extensions)

Error from Updater Application Cron Script:
Cron job has not been configured yet

For additional assistance, see cron script help"

 

I have followed this link http://devdocs.magento.com/guides/v2.0/comp-mgr/trouble/cman/cron.html

 

output of first instruction is 

carl@webserver:~$ ls -al /var/www/html/var/.setup_cronjob_status
ls: cannot access '/var/www/html/var/.setup_cronjob_status': No such file or directory

 

Out put of second instruction is 

 

# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
* * * * * /usr/bin/php /var/www/html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/html/update/cron.php >> /var/www/html/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/html/bin/magento setup:cron:run >> /var/www/html/var/log/setup.cron.log

 

I have checked php and

Loaded Configuration File/etc/php/7.0/apache2/php.ini

 

Can someone please tell me how to overcome this issue

 

1 REPLY 1

Re: Component Manager/System Upgrade Readiness Check fails- Check Cron sripts

First, make sure your crontab is running under your magento user. It should not be configured under root.

 

Second, make sure the path to your magento install directory is correctly stated in the crontab. For example:

 

/var/www/html/bin/magento setup:cron:run will only run if your magento install dir IS /var/www/html. If you install dir is actually /var/www/html/magento (or whatever) you need to specify that path or cron won't know where to find the commands you're telling it to run. You have to have the correct path in the command portion of each line, and also in the log portion of each line. It looks like you've just copy and pasted the instructions from the devdocs instead of reflecting your actual environment.

 

To fix:

<as your magento user>

sudo crontab -e

(select your editor preference if it asks you)

 scroll down to the first empty line and enter the following:

* * * * * /usr/bin/php <your magento install dir>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <your magento install dir>/var/log/magento.cron.log

* * * * * /usr/bin/php <your magento install dir>/update/cron.php >> <your magento install dir>/var/log/update.cron.log

* * * * * /usr/bin/php <your magento install dir>/bin/magento setup:cron:run >> <your magento install dir>/var/log/setup.cron.log

* * * * * /usr/bin/php <your magento install dir>/bin/magento indexer:reindex >> <your magento install dir>/var/log/indexer.log

 

Hope it helps.

 

Dave