I am trying to set up the cron job through the cli.php method following the CiviCRM Docs.

Running the command from my ssh session on the server as www-data user, I am getting the error:

could not match userID and contactID

But neither the CiviCRM logs, nor the Drupal logs, nor the apache error log gives me any further hints on what this means.

I am running CiviCRM 5.9.1 on Drupal 8.6.9.

How can I solve this?

1 Answer 1


I managed to find the solution. It seems the Drupal account used for the cron has to be synchronized with CiviCRM (to create its CiviCRM Contact) first before it can run.

Use the menu to trigger manual synchronization: Administer -> Users and Permissions -> Synchronize Users to Contacts.

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.