According to this documentation https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#drush I defined the following crontab:

* * * * * /var/www/path_to_civi_project/vendor/drush/drush/drush -u cronuser -r /var/www/path_to_civi_project/httpdocs -l https://www.public-url.org/ civicrm:api job.execute auth=0 -y

This leads to an error:

The "-u" option does not exist. 

When I remove this option the Mailings Scheduler fails:

Finished execution of Mailings scheduler with result: Failure, Error message: API permission check failed for Group/get call; insufficient permission: require access CiviCRM

As the -u option seems to be removed from newer drush versions I wonder how I get the cronjob working. Do I need cv? Can I add cv with composer?

1 Answer 1


I don't know if there still is a way to use drush but I got the cronjob working with cv:

composer require civicrm/cv

And then the crontab is:

* * * * * /var/www/path_to_civi_project/vendor/civicrm/cv/bin/cv api job.execute --user=cronuser --cwd=/var/www/path_to_civi_project/httpdocs

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.