This invocation now returns a result code of 0.
And still I see no evidence that it ran my civimail,
in the browser UI, at /civicrm/mailing/browse/unscheduled,
nor in the logs at /civicrm/admin/joblog, nor in my inbox.
I've been struggling with this issue for a moment now.
Sorting through these issues, to get to this point is documented here:
CiviMail cron job unable to find: civicrm.config.php, built with: roundearth/drupal-civicrm-project
/usr/bin/nice -n19 /usr/bin/php \
-d require /opt/local/my_client/drupal/vendor/autoload.php \
/opt/local/my_client/drupal/vendor/civicrm/cv/bin/cv api job.execute \
--cwd=/opt/local/my_client/drupal --user=mailprocess
My script now reads:
#!/bin/bash
set -x
CMD=$1
CWD='/opt/local/my_client/drupal'
CV="${CWD}/vendor/civicrm/cv/bin/cv"
CIVIMAIL_USER='mailprocess'
requirements="-d require ${CWD}/vendor/autoload.php"
PHP="/usr/bin/nice -n19 /usr/bin/php"
ARGS="--cwd=${CWD} --user=${CIVIMAIL_USER}"
cd ${CWD}; ${PHP} ${requirements} ${CV} api job.execute ${ARGS}
exit "$?"