3

I am running Magento 2.1.0 on Lamp-Ubuntu 16.04 with PHP 7.0.8.

I am getting an error while installing a new theme using system > web setup wizard > component manager.

In the readiness check process I am getting the following errors:

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

I had created a cron job, not sure I have done it correctly (I am newbie in Linux platform). Here is how I created the cron job:

In terminal:

crontab -u user -e

and then I added the following contents:

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

I got this from official Magento documentation, I changed the php and magento directory according to my setup.

But I am still getting this error. How can I check whether those jobs are running?

Is there anything else I should do? Should I create any files ?

I added the following job below those 3 jobs for testing purpose

*/5 * * * * /usr/bin/php /var/www/html/ecommerce/testcron/testcron.php >> /var/www/html/ecommerce/testcron/cron.out

testcron.php:

<?php
    echo "Hello " ;
?>

cron.out file was working fine (showing the text hello).

So whats the problem with those 3 jobs?

  • 1] First of all try to access your cronjob file using URL 2] Set it for 1 second or 1 minute for Increment Count/Send Mail, etc.. 3] Still not work then check for server support. – Ankit Shah Sep 20 '16 at 7:10
  • @AnkitShah Thanks for the reply, I tried to access those files via URL(/var/log/setup.cron.log, update.cron.log, magento.cron.log, update/cron.php) but it gives 403 forbidden error with the message 'you dont have permission to access /path/file on this server'. How can I set permission? – Abdulla Sep 20 '16 at 7:36
  • Only u need to check testcron.php & for other log files u can't access via URL, u can open in your editor – Ankit Shah Sep 20 '16 at 7:40
  • @AnkitShah It will be helpful if you can explain in detail about the 2nd step you suggested. I am new to linux – Abdulla Sep 20 '16 at 7:42
  • @AnkitShah everything is fine with testcron.php, but those log files( setup.cron.log, update.cron.log, magento.cron.log) doesn't exist in /var/log folder. – Abdulla Sep 20 '16 at 7:49
6

I went into {magento-directory}/setup/src/Magento/Setup/Controller/Environment.php

around Line 194

i commented out :

 //$setupCheck = $this->cronScriptReadinessCheck->checkSetup();
 //$updaterCheck = $this->cronScriptReadinessCheck->checkUpdater();

and replaced it with :

$setupCheck = ['success' => 1];
$updaterCheck = ['success' => 1];

this just skips the Cron check altogether.

1

I solved this by changing the permissions of var folder and its subfolder to 777 by using

sudo chmod -R 777 *

Hope this will help someone new to ubuntu and magento

  • 2
    You should never use 777 permissions, although if it's only on your own system it's probably OK. The problem might have been ownership, not permissions, not sure. Look at our file system permissions and ownership page again and see if it helps. – Steve Johnson Sep 21 '16 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.