The Sysadmin guide lists several methods to run the internal cron. On the previous site we used the http method, but now on drupal8 neither this nor calling cli.php works.

It seems a bit obvious, since some files by design remain in vendor/ and the rest are in the web visible [civicrm.files] path. JonG has a related note in his install instructions, but the PR wasn't merged, plus it seems to just tackle the composer plugin. I tried with the file anyway, but it didn't help much. It silences the error for bin/csv/export.php, but it still doesn't work. Nothing changed for cli.php and the http method still returns a unix return status of 8.

Any ideas? How do you run it on your drupal8 site?

2 Answers 2


I use cv to run cron on D8, e.g.:

12,27,42,57 * * * * /usr/local/bin/cv --cwd=/var/www/crm.mysite.org/web --user=admin --quiet api job.execute
  • I was trying to avoid installing yet another thing, but if this is the only way, then I guess I have little choice. Sep 15, 2019 at 16:40
  • There may be other ways - but cv is the drush of CiviCRM, and has a million helpful little features, so it's a standard on any of my servers. You won't regret it! Sep 15, 2019 at 16:44
  • Ah, it's also self-contained. :) I can trigger the scheduled jobs with it, but it doesn't properly work unless the user is an administrator. I gave a special user civi backend and api access (+ajax + civimail), but it doesn't appear to be enough for civimail. What do you use? Sep 15, 2019 at 22:34
  • I use a full administrator account (see above). If someone has shell access to my server with the permissions to run cv, they have permissions to read settings.php and civicrm.settings.php so there's little benefit in using a less privileged account. Sep 16, 2019 at 12:42
  • Good point. I see I can't use it properly though, since it has a bug: github.com/civicrm/cv/issues/51 off to trying drush integration, grrr Sep 16, 2019 at 18:22

It turns out cv is the only way to go on drupal8. Drush 9 is not supported yet and the web invocations don't work due to the split paths of the civi install.

If it only works for you when invoked directly and not from cron, check its output. I was hitting a somewhat buggy php test. You have to make sure php runs in cli mode.

EDIT: Official docs updated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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