After moving a site to a new server, drush cron stopped working and now I am getting the following error:

Command "cron" is not defined.

What am I missing?

  • I suppose, you already checked the version of Drush, that the root exists and a site is defined for the URI? – Mario Steinitz Mar 10 '18 at 0:37
  • yes, I am running drush 9.2, I check the root path and the URI – Emil Orol Mar 10 '18 at 1:21
  • To make things work, locally on my computer it works – Emil Orol Mar 10 '18 at 1:21

The issue was fairly simple to solve.

I had forgotten to create a settings.php for each site. I was able to find out by running the following command:

drush --local -d -r /var/www/testproject/build/html status

And from the output I was able to see:

[debug] Could not find a Drupal settings.php file at sites/default/settings.php. [0.14 sec, 10.8 MB]

That was it

| improve this answer | |

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.