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?